Skip to content

Commit 33447f3

Browse files
committed
asserts
1 parent af5ab83 commit 33447f3

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
@@ -808,6 +808,7 @@ function emitDCEGraph(ast) {
808808
emptyOut(node); // ignore this in the second pass; we scan defuns separately
809809
}
810810
} else if (node.type === 'ArrowFunctionExpression') {
811+
assert(specialScopes > 0);
811812
specialScopes--;
812813
// Check if this is the minimal runtime exports function, which looks like
813814
// (output) => { var wasmExports = output.instance.exports;
@@ -874,6 +875,7 @@ function emitDCEGraph(ast) {
874875
}
875876
}
876877
} else if (node.type === 'Property' && node.method) {
878+
assert(specialScopes > 0);
877879
specialScopes--;
878880
}
879881
},

0 commit comments

Comments
 (0)