зеркало из https://github.com/mozilla/pjs.git
Maintain the stack depth by hand when we emit the JSOP_GOSUB because the code generator cannot see the JSOP_RETSUB that balances the GOSUB out. bug 348273, r=brendan
This commit is contained in:
Родитель
cd7968d6a7
Коммит
481a4573e2
|
@ -4385,6 +4385,8 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
|
|||
return JS_FALSE;
|
||||
|
||||
if (catchJump != -1) {
|
||||
JS_ASSERT(cg->stackDepth == depth);
|
||||
|
||||
/* Fix up and clean up previous catch block. */
|
||||
CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, catchJump);
|
||||
|
||||
|
@ -4474,6 +4476,8 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
|
|||
&stmtInfo.gosub);
|
||||
if (jmp < 0)
|
||||
return JS_FALSE;
|
||||
JS_ASSERT(cg->stackDepth == depth + 1);
|
||||
cg->stackDepth = depth;
|
||||
}
|
||||
|
||||
/* This will get fixed up to jump to after catch/finally. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче