It would be useful to allow arbitrary directives (expression-statements containing string literals) in the Directive Prologue of asm.js modules and nested functions, as long as they don’t have semantic effect (so, currently, everything but “use strict”).
This extension would be useful in that it would allow us to later experiment with AOT-compilation hints. For example, one thing we’re considering (but not yet proposing) is having processing directives that tell the AOT-compiler whether an individual nested function is hot or cold. More experimentation is required, but it’d be nice if all this experimentation could happen independently of the validation predicate.
Actually, while strict-mode doesn’t cause any fundamental conflicts, it is strictly more work to support per-function strictness, so I’d prefer to allow any “non-semantically-defined processing directives” (which, currently, and for the forseeable future, is just “use strict”).
Module level & nested function level directives are going to be first expression statement in the Module\function body right? (Similar to “use strict”). If yes this looks good to me.