-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[JSPI] Remove instrumentFunction. NFC #26170
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,20 +113,18 @@ addToLibrary({ | |
| }, | ||
| #endif | ||
|
|
||
| #if ASYNCIFY == 1 | ||
| instrumentFunction(original) { | ||
| var wrapper = (...args) => { | ||
| #if ASYNCIFY_DEBUG >= 2 | ||
| dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length)} try ${original}`); | ||
| #endif | ||
| #if ASYNCIFY == 1 | ||
| Asyncify.exportCallStack.push(original); | ||
| try { | ||
| #endif | ||
| #if ASYNCIFY == 1 && MEMORY64 | ||
| #if MEMORY64 | ||
| Asyncify.saveRewindArguments(original, args); | ||
| #endif | ||
| return original(...args); | ||
| #if ASYNCIFY == 1 | ||
| } finally { | ||
| if (!ABORT) { | ||
| var top = Asyncify.exportCallStack.pop(); | ||
|
|
@@ -139,11 +137,8 @@ addToLibrary({ | |
| Asyncify.maybeStopUnwind(); | ||
| } | ||
| } | ||
| #endif | ||
| }; | ||
| #if ASYNCIFY == 1 | ||
| Asyncify.funcWrappers.set(original, wrapper); | ||
| #endif | ||
| #if MAIN_MODULE | ||
| wrapper.orig = original; | ||
| #endif | ||
|
|
@@ -152,6 +147,7 @@ addToLibrary({ | |
| #endif | ||
| return wrapper; | ||
| }, | ||
| #endif // ASYNCIFY == 1 | ||
|
|
||
| instrumentWasmExports(exports) { | ||
| #if EMBIND_GEN_MODE | ||
|
|
@@ -175,11 +171,12 @@ addToLibrary({ | |
| Asyncify.asyncExports.add(original); | ||
| original = Asyncify.makeAsyncFunction(original); | ||
| } | ||
| #endif | ||
| ret[x] = original; | ||
| #else | ||
| var wrapper = Asyncify.instrumentFunction(original); | ||
| ret[x] = wrapper; | ||
|
|
||
| } else { | ||
| #endif | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this not match Please add a comment saying what it does match, if I'm reading this wrong.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or is my confusion about JSPI - what is the value of ASYNCIFY when JSPI is enabled?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSPI means
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, makes sense now. |
||
| } else { | ||
| ret[x] = original; | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.