Skip to content

Commit a35999a

Browse files
authored
stringify
1 parent 9ea10e8 commit a35999a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/jsgen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ class JSGenerator {
13081308
// this could be an uncompiled loop block
13091309
const lastStack = this.script.stack[this.script.stack.length - 1];
13101310
const loopBlock = lastStack.kind === "compat" && lastStack.blockType === "loop" ? lastStack.block : undefined;
1311-
this.source += `yield* executeInCompatibilityLayer({ loopBlock: ${loopBlock}}, runtime.getOpcodeFunction("control_exitLoop"), false, false, "${node.id}", null);\n`;
1311+
this.source += `yield* executeInCompatibilityLayer({ loopBlock: ${JSON.stringify(loopBlock)}}, runtime.getOpcodeFunction("control_exitLoop"), false, false, "${node.id}", null);\n`;
13121312
}
13131313
break;
13141314
}
@@ -1319,7 +1319,7 @@ class JSGenerator {
13191319
// this could be an uncompiled loop block
13201320
const lastStack = this.script.stack[this.script.stack.length - 1];
13211321
const loopBlock = lastStack.kind === "compat" && lastStack.blockType === "loop" ? lastStack.block : undefined;
1322-
this.source += `yield* executeInCompatibilityLayer({ loopBlock: ${loopBlock}}, runtime.getOpcodeFunction("control_exitLoop"), false, false, "${node.id}", null);\n`;
1322+
this.source += `yield* executeInCompatibilityLayer({ loopBlock: ${JSON.stringify(loopBlock)}}, runtime.getOpcodeFunction("control_exitLoop"), false, false, "${node.id}", null);\n`;
13231323
}
13241324
break;
13251325
}

0 commit comments

Comments
 (0)