mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Fix '(void 0) is undefined' decompilation regression (420919, r=igor, a=dsicore).
This commit is contained in:
parent
9d923c0785
commit
00a12826fa
@ -1819,9 +1819,9 @@ DecompileBytecode(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
|
||||
: JSOP_GETELEM);
|
||||
} else {
|
||||
/*
|
||||
* Zero mode means precisely that op is uncategorized
|
||||
* for our purposes, so we must write per-op special
|
||||
* case code here.
|
||||
* Unknown mode (including mode 0) means that op is
|
||||
* uncategorized for our purposes, so we must write
|
||||
* per-op special case code here.
|
||||
*/
|
||||
switch (op) {
|
||||
case JSOP_ENUMELEM:
|
||||
@ -1843,6 +1843,12 @@ DecompileBytecode(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
|
||||
op = JSOP_GETLOCAL;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* NB: JSOP_GETTHISPROP can't happen here, as
|
||||
* there is no way (yet, watch out for proposed
|
||||
* ES4/JS2 strict mode) for this to be null or
|
||||
* undefined at runtime.
|
||||
*/
|
||||
LOCAL_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ typedef enum JSOpLength {
|
||||
#define JOF_PROP (2U<<5) /* obj.prop operation */
|
||||
#define JOF_ELEM (3U<<5) /* obj[index] operation */
|
||||
#define JOF_XMLNAME (4U<<5) /* XML name: *, a::b, @a, @a::b, etc. */
|
||||
#define JOF_VARPROP (5U<<5) /* x.prop for arg, var, or local x */
|
||||
#define JOF_VARPROP (5U<<5) /* x.prop for this, arg, var, or local x */
|
||||
#define JOF_MODEMASK (7U<<5) /* mask for above addressing modes */
|
||||
#define JOF_SET (1U<<8) /* set (i.e., assignment) operation */
|
||||
#define JOF_DEL (1U<<9) /* delete operation */
|
||||
|
@ -493,7 +493,7 @@ OPDEF(JSOP_LEAVEBLOCKEXPR,215,"leaveblockexpr",NULL, 3, 0, 0, 1, JOF_UINT16
|
||||
/*
|
||||
* Optimize common JSOP_{THIS,GET{ARG,VAR,LOCAL}} -> JSOP_GETPROP cliches.
|
||||
*/
|
||||
OPDEF(JSOP_GETTHISPROP, 216,"getthisprop", NULL, 3, 0, 1, 18, JOF_ATOM)
|
||||
OPDEF(JSOP_GETTHISPROP, 216,"getthisprop", NULL, 3, 0, 1, 18, JOF_ATOM|JOF_VARPROP)
|
||||
OPDEF(JSOP_GETARGPROP, 217,"getargprop", NULL, 5, 0, 1, 18, JOF_SLOTATOM|JOF_VARPROP)
|
||||
OPDEF(JSOP_GETVARPROP, 218,"getvarprop", NULL, 5, 0, 1, 18, JOF_SLOTATOM|JOF_VARPROP)
|
||||
OPDEF(JSOP_GETLOCALPROP, 219,"getlocalprop", NULL, 5, 0, 1, 18, JOF_SLOTATOM|JOF_VARPROP)
|
||||
|
Loading…
Reference in New Issue
Block a user