Bug 834090 - Name unused opcodes more sanely. r=jorendorff.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 24 Jan 2013 16:14:54 -0800
changeset 130419 32f09cb3c7b678c88b8f0cc26aa4c1c9d849b02a
parent 130418 e8c9170523069673854e2619f602dfeeec73155c
child 130420 66882ea6f8c7048b3c3aa6f235387beb86ae0c9d
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs834090
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 834090 - Name unused opcodes more sanely. r=jorendorff.
js/src/jsinterp.cpp
js/src/jsopcode.tbl
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -1336,34 +1336,34 @@ js::Interpret(JSContext *cx, StackFrame 
 
         switchMask = moreInterrupts ? -1 : 0;
         switchOp = int(op);
         goto do_switch;
     }
 
 /* No-ops for ease of decompilation. */
 ADD_EMPTY_CASE(JSOP_NOP)
-ADD_EMPTY_CASE(JSOP_UNUSED0)
-ADD_EMPTY_CASE(JSOP_UNUSED1)
-ADD_EMPTY_CASE(JSOP_UNUSED2)
-ADD_EMPTY_CASE(JSOP_UNUSED3)
-ADD_EMPTY_CASE(JSOP_UNUSED12)
-ADD_EMPTY_CASE(JSOP_UNUSED13)
-ADD_EMPTY_CASE(JSOP_UNUSED17)
-ADD_EMPTY_CASE(JSOP_UNUSED18)
-ADD_EMPTY_CASE(JSOP_UNUSED19)
-ADD_EMPTY_CASE(JSOP_UNUSED20)
-ADD_EMPTY_CASE(JSOP_UNUSED21)
-ADD_EMPTY_CASE(JSOP_UNUSED22)
-ADD_EMPTY_CASE(JSOP_UNUSED23)
-ADD_EMPTY_CASE(JSOP_UNUSED24)
-ADD_EMPTY_CASE(JSOP_UNUSED25)
-ADD_EMPTY_CASE(JSOP_UNUSED29)
-ADD_EMPTY_CASE(JSOP_UNUSED30)
-ADD_EMPTY_CASE(JSOP_UNUSED31)
+ADD_EMPTY_CASE(JSOP_UNUSED71)
+ADD_EMPTY_CASE(JSOP_UNUSED107)
+ADD_EMPTY_CASE(JSOP_UNUSED132)
+ADD_EMPTY_CASE(JSOP_UNUSED147)
+ADD_EMPTY_CASE(JSOP_UNUSED148)
+ADD_EMPTY_CASE(JSOP_UNUSED188)
+ADD_EMPTY_CASE(JSOP_UNUSED189)
+ADD_EMPTY_CASE(JSOP_UNUSED190)
+ADD_EMPTY_CASE(JSOP_UNUSED200)
+ADD_EMPTY_CASE(JSOP_UNUSED201)
+ADD_EMPTY_CASE(JSOP_UNUSED208)
+ADD_EMPTY_CASE(JSOP_UNUSED209)
+ADD_EMPTY_CASE(JSOP_UNUSED210)
+ADD_EMPTY_CASE(JSOP_UNUSED219)
+ADD_EMPTY_CASE(JSOP_UNUSED220)
+ADD_EMPTY_CASE(JSOP_UNUSED221)
+ADD_EMPTY_CASE(JSOP_UNUSED222)
+ADD_EMPTY_CASE(JSOP_UNUSED223)
 ADD_EMPTY_CASE(JSOP_CONDSWITCH)
 ADD_EMPTY_CASE(JSOP_TRY)
 #if JS_HAS_XML_SUPPORT
 ADD_EMPTY_CASE(JSOP_STARTXML)
 ADD_EMPTY_CASE(JSOP_STARTXMLEXPR)
 #endif
 END_EMPTY_CASES
 
--- a/js/src/jsopcode.tbl
+++ b/js/src/jsopcode.tbl
@@ -155,17 +155,17 @@ OPDEF(JSOP_NULL,      64, js_null_str,  
 OPDEF(JSOP_THIS,      65, js_this_str,  js_this_str,  1,  0,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_FALSE,     66, js_false_str, js_false_str, 1,  0,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_TRUE,      67, js_true_str,  js_true_str,  1,  0,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_OR,        68, "or",         NULL,         5,  1,  1,  5,  JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC)
 OPDEF(JSOP_AND,       69, "and",        NULL,         5,  1,  1,  6,  JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC)
 
 /* The switch bytecodes have variable length. */
 OPDEF(JSOP_TABLESWITCH, 70, "tableswitch", NULL,     -1,  1,  0,  0,  JOF_TABLESWITCH|JOF_DETECTING|JOF_PARENHEAD)
-OPDEF(JSOP_UNUSED0,   71, "unused0",    NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED71,  71, "unused71",   NULL,         1,  0,  0,  0,  JOF_BYTE)
 
 /* New, infallible/transitive identity ops. */
 OPDEF(JSOP_STRICTEQ,  72, "stricteq",   "===",        1,  2,  1, 10,  JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC|JOF_ARITH)
 OPDEF(JSOP_STRICTNE,  73, "strictne",   "!==",        1,  2,  1, 10,  JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC|JOF_ARITH)
 
 /*
  * Sometimes web pages do 'o.Item(i) = j'. This is not an early SyntaxError,
  * for web compatibility. Instead we emit JSOP_SETCALL after the function call,
@@ -246,17 +246,17 @@ OPDEF(JSOP_DECLOCAL,  102,"declocal",   
 OPDEF(JSOP_LOCALINC,  103,"localinc",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_INC|JOF_POST|JOF_TMPSLOT3|JOF_DECOMPOSE)
 OPDEF(JSOP_LOCALDEC,  104,"localdec",   NULL,         3,  0,  1, 15,  JOF_LOCAL|JOF_NAME|JOF_DEC|JOF_POST|JOF_TMPSLOT3|JOF_DECOMPOSE)
 
 /* Leave a for-let-in block leaving its storage pushed (to be popped after enditer). */
 OPDEF(JSOP_LEAVEFORLETIN, 105,"leaveforletin",NULL,   1,  0,  0,  0,  JOF_BYTE)
 
 /* The argument is the offset to the next statement and is used by IonMonkey. */
 OPDEF(JSOP_LABEL,     106,"label",     NULL,          5,  0,  0,  0,  JOF_JUMP)
-OPDEF(JSOP_UNUSED3,   107,"unused3",   NULL,          1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED107, 107,"unused107", NULL,          1,  0,  0,  0,  JOF_BYTE)
 
 /* Like JSOP_FUNAPPLY but for f.call instead of f.apply. */
 OPDEF(JSOP_FUNCALL,   108,"funcall",    NULL,         3, -1,  1, 18,  JOF_UINT16|JOF_INVOKE|JOF_TYPESET)
 
 /* This opcode is the target of the backwards jump for some loop. */
 OPDEF(JSOP_LOOPHEAD,  109,"loophead",   NULL,         1,  0,  0,  0,  JOF_BYTE)
 
 /* ECMA-compliant assignment ops. */
@@ -318,17 +318,17 @@ OPDEF(JSOP_DEFCONST,  128,"defconst",   
 OPDEF(JSOP_DEFVAR,    129,"defvar",     NULL,         5,  0,  0,  0,  JOF_ATOM)
 
 /* Push a closure for a named or anonymous function expression. */
 OPDEF(JSOP_LAMBDA,    130, "lambda",    NULL,         5,  0,  1, 19,  JOF_OBJECT)
 
 /* Used for named function expression self-naming, if lightweight. */
 OPDEF(JSOP_CALLEE,    131, "callee",    NULL,         1,  0,  1, 19,  JOF_BYTE)
 
-OPDEF(JSOP_UNUSED31,  132, "unused31",  NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED132, 132, "unused132", NULL,         1,  0,  0,  0,  JOF_BYTE)
 
 /* Pick an element from the stack. */
 OPDEF(JSOP_PICK,        133, "pick",      NULL,       2,  0,  0,  0,  JOF_UINT8|JOF_TMPSLOT2)
 
 /*
  * Exception handling no-op, for more economical byte-coding than SRC_TRYFIN
  * srcnote-annotated JSOP_NOPs and to simply stack balance handling.
  */
@@ -366,18 +366,18 @@ OPDEF(JSOP_ALIASEDVARDEC, 142,"aliasedva
  * intrinsic functions the runtime doesn't give client JS code access to.
  */
 OPDEF(JSOP_GETINTRINSIC,  143, "getintrinsic",  NULL, 5,  0,  1, 19,  JOF_ATOM|JOF_NAME|JOF_TYPESET)
 OPDEF(JSOP_CALLINTRINSIC, 144, "callintrinsic", NULL, 5,  0,  1, 19,  JOF_ATOM|JOF_NAME|JOF_TYPESET)
 OPDEF(JSOP_SETINTRINSIC,  145, "setintrinsic",  NULL, 5,  2,  1,  3,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING)
 OPDEF(JSOP_BINDINTRINSIC, 146, "bindintrinsic", NULL, 5,  0,  1,  0,  JOF_ATOM|JOF_NAME|JOF_SET)
 
 /* Unused. */
-OPDEF(JSOP_UNUSED12,      147,"unused12", NULL,       1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED13,      148,"unused13", NULL,       1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED147,     147,"unused147", NULL,      1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED148,     148,"unused148", NULL,      1,  0,  0,  0,  JOF_BYTE)
 
 /* Placeholders for a real jump opcode set during backpatch chain fixup. */
 OPDEF(JSOP_BACKPATCH,     149,"backpatch",NULL,       5,  0,  0,  0,  JOF_JUMP|JOF_BACKPATCH)
 OPDEF(JSOP_BACKPATCH_POP, 150,"backpatch_pop",NULL,   5,  1,  0,  0,  JOF_JUMP|JOF_BACKPATCH)
 
 /* Set pending exception from the stack, to trigger rethrow. */
 OPDEF(JSOP_THROWING,      151,"throwing", NULL,       1,  1,  0,  0,  JOF_BYTE)
 
@@ -429,19 +429,19 @@ OPDEF(JSOP_ENTERLET0,     185,"enterlet0
 /* Enter a let block/expr whose slots are 1 below the top of the stack. */
 OPDEF(JSOP_ENTERLET1,     186,"enterlet1",  NULL,     5, -1, -1,  0,  JOF_OBJECT)
 
 /*
  * Opcode to hold 24-bit immediate integer operands.
  */
 OPDEF(JSOP_UINT24,        187,"uint24",     NULL,     4,  0,  1, 16,  JOF_UINT24)
 
-OPDEF(JSOP_UNUSED18,      188,"unused18",    NULL,    1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED19,      189,"unused19",    NULL,    1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED20,      190,"unused20",    NULL,    1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED188,     188,"unused188",   NULL,    1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED189,     189,"unused189",   NULL,    1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED190,     190,"unused190",   NULL,    1,  0,  0,  0,  JOF_BYTE)
 
 /*
  * Opcodes to help the decompiler deal with XML.
  */
 OPDEF(JSOP_STARTXML,      191,"startxml",    NULL,    1,  0,  0,  0,  JOF_BYTE)
 OPDEF(JSOP_STARTXMLEXPR,  192,"startxmlexpr",NULL,    1,  0,  0,  0,  JOF_BYTE)
 
 OPDEF(JSOP_CALLELEM,      193, "callelem",   NULL,    1,  2,  1, 18,  JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC)
@@ -467,18 +467,18 @@ OPDEF(JSOP_TYPEOFEXPR,    197,"typeofexp
 
 /*
  * Block-local scope support.
  */
 OPDEF(JSOP_ENTERBLOCK,    198,"enterblock",  NULL,    5,  0, -1,  0,  JOF_OBJECT)
 OPDEF(JSOP_LEAVEBLOCK,    199,"leaveblock",  NULL,    3, -1,  0,  0,  JOF_UINT16)
 
 
-OPDEF(JSOP_UNUSED1,       200,"unused1",    NULL,     1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED2,       201,"unused2",    NULL,     1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED200,     200,"unused200",  NULL,     1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED201,     201,"unused201",  NULL,     1,  0,  0,  0,  JOF_BYTE)
 
 /*
  * Generator and array comprehension support.
  */
 OPDEF(JSOP_GENERATOR,     202,"generator",   NULL,    1,  0,  0,  0,  JOF_BYTE)
 OPDEF(JSOP_YIELD,         203,"yield",       NULL,    1,  1,  1,  1,  JOF_BYTE)
 OPDEF(JSOP_ARRAYPUSH,     204,"arraypush",   NULL,    3,  1,  0,  3,  JOF_LOCAL)
 
@@ -493,19 +493,19 @@ OPDEF(JSOP_GETFUNNS,      205,"getfunns"
 OPDEF(JSOP_ENUMCONSTELEM, 206,"enumconstelem",NULL,   1,  3,  0,  3,  JOF_BYTE|JOF_SET)
 
 /*
  * Variant of JSOP_LEAVEBLOCK has a result on the stack above the locals,
  * which must be moved down when the block pops.
  */
 OPDEF(JSOP_LEAVEBLOCKEXPR,207,"leaveblockexpr",NULL,  3, -1,  1,  3,  JOF_UINT16)
 
-OPDEF(JSOP_UNUSED21,      208, "unused21",     NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED22,      209, "unused22",     NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED23,      210, "unused23",     NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED208,     208, "unused208",    NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED209,     209, "unused209",    NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED210,     210, "unused210",    NULL,  1,  0,  0,  0,  JOF_BYTE)
 
 OPDEF(JSOP_CALLGNAME,     211, "callgname",    NULL,  5,  0,  1, 19,  JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME)
 OPDEF(JSOP_CALLLOCAL,     212, "calllocal",    NULL,  3,  0,  1, 19,  JOF_LOCAL|JOF_NAME)
 OPDEF(JSOP_CALLARG,       213, "callarg",      NULL,  3,  0,  1, 19,  JOF_QARG |JOF_NAME)
 OPDEF(JSOP_BINDGNAME,     214, "bindgname",    NULL,  5,  0,  1,  0,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_GNAME)
 
 /*
  * Opcodes to hold 8-bit and 32-bit immediate integer operands.
@@ -520,21 +520,21 @@ OPDEF(JSOP_LENGTH,        217, "length",
 
 /*
  * Push a JSVAL_HOLE value onto the stack, representing an omitted property in
  * an array literal (e.g. property 0 in the array [, 1]).  This opcode is used
  * with the JSOP_NEWARRAY opcode.
  */
 OPDEF(JSOP_HOLE,          218, "hole",         NULL,  1,  0,  1,  0,  JOF_BYTE)
 
-OPDEF(JSOP_UNUSED17,      219,"unused17",      NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED24,      220,"unused24",      NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED25,      221,"unused25",      NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED29,      222,"unused29",      NULL,  1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED30,      223,"unused30",      NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED219,     219,"unused219",     NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED220,     220,"unused220",     NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED221,     221,"unused221",     NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED222,     222,"unused222",     NULL,  1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED223,     223,"unused223",     NULL,  1,  0,  0,  0,  JOF_BYTE)
 
 OPDEF(JSOP_REST,          224, "rest",         NULL,  1,  0,  1,  0,  JOF_BYTE|JOF_TYPESET)
 
 /* Pop the stack, convert to a jsid (int or string), and push back. */
 OPDEF(JSOP_TOID,          225, "toid",         NULL,  1,  1,  1,  0,  JOF_BYTE)
 
 /* Push the implicit 'this' value for calls to the associated name. */
 OPDEF(JSOP_IMPLICITTHIS,  226, "implicitthis", "",    5,  0,  1,  0,  JOF_ATOM)