-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Move modularization code into js compiler #23261
Draft
sbc100
wants to merge
2
commits into
emscripten-core:main
Choose a base branch
from
sbc100:modularize_closure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
WDYT @brendandahl ? |
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Dec 30, 2024
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Dec 31, 2024
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Dec 31, 2024
sbc100
added a commit
that referenced
this pull request
Dec 31, 2024
sbc100
force-pushed
the
modularize_closure
branch
2 times, most recently
from
December 31, 2024 00:32
c015e1f
to
04c36e3
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Dec 31, 2024
Processing them early (in phase_linker_setup) meant that they values of some settings had not yet been finalized. Split out from emscripten-core#23261
sbc100
added a commit
that referenced
this pull request
Dec 31, 2024
Processing them early (in phase_linker_setup) meant that they values of some settings had not yet been finalized. Split out from #23261
sbc100
force-pushed
the
modularize_closure
branch
from
January 2, 2025 20:39
04c36e3
to
9c7603d
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Jan 2, 2025
I don't see why `-sMINIMAL_RUNTIME` users would not want the same exporting of the module. The EXPORT_ES6 behaviour was already matching. This change is necessary are part of emscripten-core#23261 which feeds the modularized code through closure and our acorn optimizations. Without this closer things the entire module factory is seen as unused and is deleted.
I don't see why `-sMINIMAL_RUNTIME` users would not want the same exporting of the module. The EXPORT_ES6 behaviour was already matching. This change is necessary are part of emscripten-core#23261 which feeds the modularized code through closure and our acorn optimizations. Without this closer things the entire module factory is seen as unused and is deleted.
fafb1a877e851f84c71de6531fe37de2c7700c29 Move modularization code into js compiler Prior to this change the mudularization was done as a post-processing step in python. This complicated things since acorn and closure passes would only see the inner code and not the whole module. One concrete benefit is that we can now use `await` in the body of the factory function since closure no longer sees it as top level (which it isn't). Fixes: emscripten-core#23158, emscripten-core#23283
sbc100
force-pushed
the
modularize_closure
branch
from
January 3, 2025 22:45
9c7603d
to
134eb7a
Compare
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.
Prior to this change the mudularization was done as a post-processing step in python. This complicated things since acorn and closure passes would only see the inner code and not the whole module.
One concrete benefit is that we can now use
await
in the body of the factory function since closure no longer sees it as top level (which it isn't).Fixes: #23158