Skip over exception cookies, since we require JSOP_POP to pop them. bug 380016, r=brendan

This commit is contained in:
mrbkap@gmail.com 2007-05-17 16:56:17 -07:00
parent f101b9d312
commit bdd4bb4a9c

View File

@ -2338,7 +2338,14 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
op = JSOP_NOP;
rval = POP_STR();
if (*rval != '\0') {
/*
* Don't emit decompiler-pushed strings that are not
* handled by other opcodes. They are pushed onto the
* stack to help model the interpreter stack and should
* not appear in the decompiler's output.
*/
if (*rval != '\0' && (rval[0] != '/' || rval[1] != '*')) {
#if JS_HAS_BLOCK_SCOPE
/*
* If a let declaration is the only child of a control
@ -2360,6 +2367,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
? "\t(%s);\n"
: "\t%s;\n",
rval);
} else {
LOCAL_ASSERT(*rval == '\0' ||
strcmp(rval, exception_cookie) == 0);
}
todo = -2;
break;