Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove asserts for using stack functions too early (#11211)
These functions come from within the asm/wasm module these days. Both in the asmjs case and in the wasm case, both the fastcomp and llvm backend. Since they come from the asm module they are already protected by the same mechanism that protects against calling any native code. For example compiling hello.c generates the following snippet when compiling with assertions: ``` /** @type {function(...*):?} */ var stackAlloc = Module["stackAlloc"] = function() { assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)'); assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)'); return Module["asm"]["stackAlloc"].apply(null, arguments) }; ``` This also avoids the problem of declaring these as var or not.
- Loading branch information