Fix element-setting decompilation (352202, r=mrbkap).

git-svn-id: svn://10.0.0.236/trunk@209774 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org 2006-09-11 21:09:37 +00:00
parent 3551776d83
commit 5cd009544f

View File

@ -2153,7 +2153,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
*/
atom = NULL;
xval = POP_STR();
op = JSOP_GETELEM; /* lval must have high precedence */
lval = POP_STR();
op = saveop;
rval = POP_STR();
LOCAL_ASSERT(strcmp(rval, forelem_cookie) == 0);
LOCAL_ASSERT(forelem_tail > pc);
@ -2533,7 +2535,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
case JSOP_GETELEM:
case JSOP_GETXELEM:
op = JSOP_NOP; /* turn off parens */
op = JSOP_NOP; /* turn off parens */
xval = POP_STR();
op = saveop;
lval = POP_STR();
@ -2550,11 +2552,12 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
case JSOP_SETELEM:
rval = POP_STR();
op = JSOP_NOP; /* turn off parens */
op = JSOP_NOP; /* turn off parens */
xval = POP_STR();
cs = &js_CodeSpec[ss->opcodes[ss->top]];
op = saveop;
op = JSOP_GETELEM; /* lval must have high precedence */
lval = POP_STR();
op = saveop;
if (*xval == '\0')
goto do_setlval;
sn = js_GetSrcNote(jp->script, pc - 1);