Skip to content

Commit e8da68e

Browse files
committed
more asserts
1 parent 0f22581 commit e8da68e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/acorn-optimizer.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ function emitDCEGraph(ast) {
806806
emptyOut(node); // ignore this in the second pass; we scan defuns separately
807807
}
808808
} else if (node.type === 'ArrowFunctionExpression') {
809+
assert(specialScopes > 0);
809810
specialScopes--;
810811
// Check if this is the minimal runtime exports function, which looks like
811812
// (output) => { var wasmExports = output.instance.exports;
@@ -872,6 +873,7 @@ function emitDCEGraph(ast) {
872873
}
873874
}
874875
} else if (node.type === 'Property' && node.method) {
876+
assert(specialScopes > 0);
875877
specialScopes--;
876878
}
877879
}, (node) => {

0 commit comments

Comments
 (0)