You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for the new JavaScript promise integration API. (#17724)
- Enables the new "jspi" pass in binaryen.
- Wraps all imports/exports in a suspending/promising. WebAssembly.Function.
This currently wraps everything, but we could make it only wrap async
functions as needed.
// Add space for the suspender promise that will be used in the
99
+
// Wasm wrapper function.
100
+
type.parameters.unshift('externref');
101
+
imports[x]=original=newWebAssembly.Function(
102
+
type,
103
+
original,
104
+
{suspending: 'first'}
105
+
);
115
106
#endif
116
107
#if ASSERTIONS&&ASYNCIFY!=2// We cannot apply assertions with stack switching, as the imports must not be modified from suspender.suspendOnReturnedPromise TODO find a way
0 commit comments