-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[MODULARIZE=instance] Mark -sDYNCALLS as not supported. NFC #24340
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
41d5bee to
690ca19
Compare
33b19f4 to
4bf37f7
Compare
242e328 to
ff802f5
Compare
| #if PTHREADS | ||
| // When run as a pthread we run `init` immediately. | ||
| if (ENVIRONMENT_IS_PTHREAD) await init() | ||
| #if PTHREADS || WASM_WORKERS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this suppose to be in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes without this the test_embind_wasm_workers doesn't work. This basically makes wasm worker work in this mode.
|
|
||
| def test_embind_val_coro(self): | ||
| create_file('post.js', r'''Module.onRuntimeInitialized = () => { | ||
| create_file('pre.js', r'''Module.onRuntimeInitialized = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the conversion from post.js to pre.js here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding onRuntimeInitialized during post.js doesn't work in the case we do top-level-await on the wasm module because in that case (and also in the case of sync instantiation) the initialization has already been done before the post-js stuff runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes fixes this test so that it works in all mode.
| // Weak map of handle functions to their wrapper. Used to implement | ||
| // addEventListener/removeEventListener. | ||
| var wrappedHandlers = new WeakMap(); | ||
| globalThis.onmessage = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could split the wasm workers stuff into a separate PR but I've already done a lot of splitting. Let me know if you want me to split this one off too.
a1aab55 to
e3ecbf4
Compare
Also by extension `-sASYNCIFY=1` is not supported either. Also enable a bunch more tests
e3ecbf4 to
86ff51e
Compare
Also enable a bunch more tests