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
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
Copy file name to clipboardExpand all lines: tools/acorn-optimizer.mjs
+1-4
Original file line number
Diff line number
Diff line change
@@ -889,10 +889,7 @@ function emitDCEGraph(ast) {
889
889
// Scoping must balance out.
890
890
assert(specialScopes===0);
891
891
// We must have found the info we need.
892
-
assert(
893
-
foundWasmImportsAssign,
894
-
'could not find the assignment to "wasmImports". perhaps --pre-js or --post-js code moved it out of the global scope? (things like that should be done after emcc runs, as they do not need to be run through the optimizer which is the special thing about --pre-js/--post-js code)',
895
-
);
892
+
assert(foundWasmImportsAssign,'could not find the assignment to "wasmImports"');
0 commit comments