mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Fix JSOP_SETCALL and JSOP_POPV precedences; turn off auto-parens for bracketed index values (352079, r=mrbkap).
This commit is contained in:
parent
31964022bb
commit
f7baa26e81
@ -2323,7 +2323,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
|
||||
break;
|
||||
|
||||
case JSOP_DELELEM:
|
||||
op = JSOP_NOP; /* turn off parens */
|
||||
xval = POP_STR();
|
||||
op = saveop;
|
||||
lval = POP_STR();
|
||||
if (*xval == '\0')
|
||||
goto do_delete_lval;
|
||||
@ -2395,7 +2397,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
|
||||
|
||||
case JSOP_INCELEM:
|
||||
case JSOP_DECELEM:
|
||||
op = JSOP_NOP; /* turn off parens */
|
||||
xval = POP_STR();
|
||||
op = saveop;
|
||||
lval = POP_STR();
|
||||
if (*xval != '\0') {
|
||||
todo = Sprint(&ss->sprinter,
|
||||
@ -2454,7 +2458,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
|
||||
|
||||
case JSOP_ELEMINC:
|
||||
case JSOP_ELEMDEC:
|
||||
op = JSOP_NOP; /* turn off parens */
|
||||
xval = POP_STR();
|
||||
op = saveop;
|
||||
lval = POP_STR();
|
||||
if (*xval != '\0') {
|
||||
todo = Sprint(&ss->sprinter,
|
||||
|
@ -309,7 +309,7 @@ OPDEF(JSOP_SETLOCALPOP, 130, "setlocalpop", NULL, 3, 1, 0, 3, JOF_LOCAL|
|
||||
OPDEF(JSOP_GROUP, 131, "group", NULL, 1, 0, 0, 0, JOF_BYTE)
|
||||
|
||||
/* Host object extension: given 'o.item(i) = j', the left-hand side compiles JSOP_SETCALL, rather than JSOP_CALL. */
|
||||
OPDEF(JSOP_SETCALL, 132, "setcall", NULL, 3, -1, 2, 3, JOF_UINT16|JOF_SET|JOF_ASSIGNING)
|
||||
OPDEF(JSOP_SETCALL, 132, "setcall", NULL, 3, -1, 2, 17, JOF_UINT16|JOF_SET|JOF_ASSIGNING)
|
||||
|
||||
/*
|
||||
* Exception handling no-ops, for more economical byte-coding than SRC_TRYFIN
|
||||
|
Loading…
Reference in New Issue
Block a user