Workaround for wasm2js output minification issue with emscripten#2185
Merged
kripken merged 2 commits intoWebAssembly:masterfrom Jul 1, 2019
Merged
Workaround for wasm2js output minification issue with emscripten#2185kripken merged 2 commits intoWebAssembly:masterfrom
kripken merged 2 commits intoWebAssembly:masterfrom
Conversation
When using emscripten with -O2 and --memory-init-file 0, the JS minification breaks on this function for memory initialization setup, causing an exception to be thrown during module setup. Moving from two 'var' declarations for the same variable to one should avoid hitting this with no change in functionality (the var gets hoisted anyway). emscripten-core/emscripten#8886
Member
|
Looks good to me! What a strange bug. We hope to get the CI unbroken soon so this can get in. |
tlively
approved these changes
Jun 28, 2019
Member
|
@Brion It looks like the test failures are legit. Can you update the tests? |
Manually hoisted a var declaration to work around a minifier bug when used with emscripten at -O2 and above.
Contributor
Author
Done. Hopefully all clear this time! :D |
Member
|
Looks good, thanks @Brion! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using emscripten with -O2 and --memory-init-file 0, the
JS minification breaks on this function for memory initialization
setup, causing an exception to be thrown during module setup.
Moving from two 'var' declarations for the same variable to one
should avoid hitting this with no change in functionality (the
var gets hoisted anyway).
emscripten-core/emscripten#8886