Skip to content

Warn on functions that may be too big for some VMs #1246

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 25, 2017

Background: WebAssembly/design#1138 - browser vendors are starting to apply a new limit on function body size, to 128K. This was apparently agreed upon before, but not applied. There is also a movement to a larger constant than 128K, but at least Edge will have the 128K limit for several months (and Chrome just started to apply it on Canary, but might get the new larger constant soon, not clear).

So this PR emits a warning when a function body is 128K or more. The warning might be enough for some users, as they may be able to disable inlining or other optimizations, if they were the cause of the large function. However, it's possible that won't always be an option, either because it's not simple to tweak those optimizations without downsides, or because the big function is the output of a code generator.

This PR also creates a "table of contents" for each function, which may be useful for other things soon.

@kripken
Copy link
Member Author

kripken commented Dec 5, 2017

Any thoughts on if we should show this warning about big functions?

Base automatically changed from master to main January 19, 2021 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant