DescriptionGet rid of PropagateScopeInfo, update asm_function in set_asm_module instead.
The last user was propagating asm_module_ to inner function scopes as asm_function_. asm_function_ is already set upon scope creation when the outer scope IsAsmModule(). With default parameter it's possible that inner scopes are created before set_asm_module() is called. To keep current behavior we'll eagerly mark inner scopes as asm_function_ upon set_asm_module().
There's only one special case that used to be marked asm_function_ which is now no longer marked as such: asm functions in block scopes that are 'Finalized'. PropagateScopeInfo used to mark them as asm_function_ as well, whereas the new version would not mark them upon construction of the inner scope.
I presume both above cornercases aren't actually intended valid asm.js use-cases anyway. The second we can now easily identify in the verifier and mark as invalid asm, since we'll have an asm module with non-asm-function inner functions. If we want to disallow the first, we can also not mark them as asm_functions_ (by removing the loop I added in set_asm_module), which will reveal this structure to the validator.
BUG=v8:5209
Committed: https://crrev.com/ce9e773828fdd946eee243c1229f914b548df82c
Cr-Commit-Position: refs/heads/master@{#39039}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Move set_asm_module to scopes.cc #Patch Set 3 : rebase #Messages
Total messages: 12 (4 generated)
|