-
-
Notifications
You must be signed in to change notification settings - Fork 670
Use Binaryen's directed inlining #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also need fix warnings like |
Hmm, that might turn out to be quite a problem. Previously, we could just precompute inlined calls, which we can't anymore because inlining is performed on finalization. That's actually a good reason to keep our own inlining, unless we could |
binaryen has method which could check cost for function and get possibility for inlining it and also side effect checking. So what if just check if it return |
Yeah, good idea. Precompute would essentially have to evaluate called function bodies for this. Not just constant returns, though, but also calls to other functions that might again be inlined etc. (probably everything) |
Hmm. It seems make sense keep some own inline stuff specially for class field's initialization |
Plus, seems the build breaks because of webpack running out of memory (or something, again). I didn't see that coming. |
Try to update webpack to latest. It may be this already fixed bug: webpack/webpack#8639 |
It seems same issue: |
Need to try cc @xtuc |
Closing in favor of #463 |
This replaces our custom inlining with what's proposed in this Binaryen PR. Uses a custom Binaryen build for that purpose currently and probably needs some additional work, but pinning it here already so we can have a look how that'd turn out.