Bug 963434 - Remove jsopcode.tbl and jsoplengen.cpp in favor of a higher-order macro, and make JSOP_*_LENGTH into C++ constant variables. This will make the build process simpler, and it likely eliminates a needs-CLOBBER situation encountered while landing bug 948583. Particular thanks to r=jorendorff for the fast review here (given any change at all to jsopcode.tbl would bitrot this), DONTBUILD because already landed with wrong bug number
authorJeff Walden <jwalden@mit.edu>
Fri, 24 Jan 2014 13:21:09 -0800
changeset 181198 b5aad0b45a84d83c0548434d1377311271b01128
parent 181197 bb900e8085fdd2e3fc21f7002ad3e3c490577cfb
child 181199 d651d623964173877f3e5f73d4387c5b7114d6f7
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs963434, 948583
milestone29.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 963434 - Remove jsopcode.tbl and jsoplengen.cpp in favor of a higher-order macro, and make JSOP_*_LENGTH into C++ constant variables. This will make the build process simpler, and it likely eliminates a needs-CLOBBER situation encountered while landing bug 948583. Particular thanks to r=jorendorff for the fast review here (given any change at all to jsopcode.tbl would bitrot this), DONTBUILD because already landed with wrong bug number
config/check_spidermonkey_style.py
js/src/Makefile.in
js/src/frontend/BytecodeEmitter.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/IonBuilder.cpp
js/src/jsanalyze.cpp
js/src/jsarray.cpp
js/src/jsinfer.cpp
js/src/jsopcode.cpp
js/src/jsopcode.h
js/src/jsopcode.tbl
js/src/jsoplengen.cpp
js/src/jsscript.cpp
js/src/jsstr.cpp
js/src/moz.build
js/src/vm/Interpreter.cpp
js/src/vm/Opcodes.h
js/src/vm/Stack.cpp
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -58,17 +58,16 @@ ignored_js_src_dirs = [
 # We ignore #includes of these files, because they don't follow the usual rules.
 included_inclnames_to_ignore = set([
     'ffi.h',                    # generated in ctypes/libffi/
     'devtools/sharkctl.h',      # we ignore devtools/ in general
     'devtools/Instruments.h',   # we ignore devtools/ in general
     'double-conversion.h',      # strange MFBT case
     'javascript-trace.h',       # generated in $OBJDIR if HAVE_DTRACE is defined
     'jsautokw.h',               # generated in $OBJDIR
-    'jsautooplen.h',            # generated in $OBJDIR
     'jscustomallocator.h',      # provided by embedders;  allowed to be missing
     'js-config.h',              # generated in $OBJDIR
     'pratom.h',                 # NSPR
     'prcvar.h',                 # NSPR
     'prinit.h',                 # NSPR
     'prlink.h',                 # NSPR
     'prlock.h',                 # NSPR
     'prprf.h',                  # NSPR
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -58,18 +58,16 @@ SDK_LIBRARY = $(SHARED_LIBRARY)
 endif
 
 EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
 
 # Define keyword generator before rules.mk, see bug 323979 comment 50
 
 GARBAGE += jsautokw.h host_jskwgen$(HOST_BIN_SUFFIX)
 
-GARBAGE += jsautooplen.h host_jsoplengen$(HOST_BIN_SUFFIX)
-
 GARBAGE += selfhosted.out.h
 
 USE_HOST_CXX = 1
 
 ifdef HAVE_DTRACE
 ifneq ($(OS_ARCH),Darwin)
 DTRACE_PROBE_OBJ = $(LIBRARY_NAME)-dtrace.$(OBJ_SUFFIX)
 endif
@@ -403,23 +401,18 @@ ifneq (,$(IMPORT_LIBRARY))
 endif
 	$(MAKE) -C shell install
 
 # Use CURDIR to avoid finding a jsautokw.h in the source tree (from a
 # previous build?) via VPATH when we're building in a separate tree.
 $(CURDIR)/jsautokw.h: host_jskwgen$(HOST_BIN_SUFFIX)
 	./host_jskwgen$(HOST_BIN_SUFFIX) $@
 
-# Use CURDIR to avoid finding a jsautooplen.h in the source tree (from
-# a previous build?) via VPATH when we're building in a separate tree.
-$(CURDIR)/jsautooplen.h: host_jsoplengen$(HOST_BIN_SUFFIX)
-	./host_jsoplengen$(HOST_BIN_SUFFIX) $@
-
 # Force auto-header generation before compiling any source that may use them
-$(OBJS): $(CURDIR)/jsautokw.h $(CURDIR)/jsautooplen.h
+$(OBJS): $(CURDIR)/jsautokw.h
 
 ifdef MOZ_ETW
 ETWProvider.h ETWProvider.rc ETWProvider.mof: ETWProvider.man
 	$(MC) -um -mof $^
 
 ETWProvider.res: ETWProvider.rc
 	$(RC) -r -i '$(SDKDIR)Include' $^
 
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -13,17 +13,16 @@
 #include "mozilla/DebugOnly.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/PodOperations.h"
 
 #include <string.h>
 
 #include "jsapi.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jsfun.h"
 #include "jsnum.h"
 #include "jsopcode.h"
 #include "jsscript.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -4,30 +4,30 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jit/BaselineIC.h"
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/TemplateLib.h"
 
-#include "jsautooplen.h"
 #include "jslibmath.h"
 #include "jstypes.h"
 
 #include "builtin/Eval.h"
 #include "jit/BaselineHelpers.h"
 #include "jit/BaselineJIT.h"
 #include "jit/IonLinker.h"
 #include "jit/IonSpewer.h"
 #include "jit/Lowering.h"
 #ifdef JS_ION_PERF
 # include "jit/PerfSpewer.h"
 #endif
 #include "jit/VMFunctions.h"
+#include "vm/Opcodes.h"
 
 #include "jsboolinlines.h"
 #include "jsscriptinlines.h"
 
 #include "jit/IonFrames-inl.h"
 #include "vm/Interpreter-inl.h"
 #include "vm/ScopeObject-inl.h"
 #include "vm/StringObject-inl.h"
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -3,32 +3,30 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jit/IonBuilder.h"
 
 #include "mozilla/DebugOnly.h"
 
-#include "jsautooplen.h"
-
 #include "builtin/Eval.h"
 #include "builtin/TypedObject.h"
 #include "builtin/TypeRepresentation.h"
 #include "frontend/SourceNotes.h"
 #include "jit/BaselineFrame.h"
 #include "jit/BaselineInspector.h"
 #include "jit/ExecutionModeInlines.h"
 #include "jit/Ion.h"
 #include "jit/IonOptimizationLevels.h"
 #include "jit/IonSpewer.h"
 #include "jit/Lowering.h"
 #include "jit/MIRGraph.h"
-
 #include "vm/ArgumentsObject.h"
+#include "vm/Opcodes.h"
 #include "vm/RegExpStatics.h"
 
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 #include "jsopcodeinlines.h"
 #include "jsscriptinlines.h"
 
 #include "jit/CompileInfo-inl.h"
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -3,20 +3,21 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/PodOperations.h"
 
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jscompartment.h"
 
+#include "vm/Opcodes.h"
+
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 #include "jsopcodeinlines.h"
 
 using mozilla::DebugOnly;
 using mozilla::PodCopy;
 using mozilla::PodZero;
 using mozilla::FloorLog2;
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -8,17 +8,16 @@
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/MathAlgorithms.h"
 
 #include "jsapi.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jsfriendapi.h"
 #include "jsfun.h"
 #include "jsiter.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jstypes.h"
 #include "jsutil.h"
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -6,17 +6,16 @@
 
 #include "jsinferinlines.h"
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/PodOperations.h"
 
 #include "jsapi.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jsgc.h"
 #include "jshashutil.h"
 #include "jsobj.h"
 #include "jsprf.h"
 #include "jsscript.h"
 #include "jsstr.h"
 #include "jsworkers.h"
@@ -25,16 +24,17 @@
 #include "gc/Marking.h"
 #ifdef JS_ION
 #include "jit/BaselineJIT.h"
 #include "jit/Ion.h"
 #include "jit/IonAnalysis.h"
 #include "jit/JitCompartment.h"
 #endif
 #include "js/MemoryMetrics.h"
+#include "vm/Opcodes.h"
 #include "vm/Shape.h"
 
 #include "jsatominlines.h"
 #include "jsgcinlines.h"
 #include "jsobjinlines.h"
 #include "jsscriptinlines.h"
 
 using namespace js;
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -13,31 +13,31 @@
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 
 #include "jsanalyze.h"
 #include "jsapi.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jscompartment.h"
 #include "jsfun.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jsprf.h"
 #include "jsscript.h"
 #include "jsstr.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "frontend/BytecodeCompiler.h"
 #include "frontend/SourceNotes.h"
 #include "js/CharacterEncoding.h"
+#include "vm/Opcodes.h"
 #include "vm/ScopeObject.h"
 #include "vm/Shape.h"
 #include "vm/StringBuffer.h"
 
 #include "jscntxtinlines.h"
 #include "jscompartmentinlines.h"
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
@@ -48,51 +48,42 @@ using namespace js::gc;
 
 using js::frontend::IsIdentifier;
 
 /*
  * Index limit must stay within 32 bits.
  */
 JS_STATIC_ASSERT(sizeof(uint32_t) * JS_BITS_PER_BYTE >= INDEX_LIMIT_LOG2 + 1);
 
-/* Verify JSOP_XXX_LENGTH constant definitions. */
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format)               \
-    JS_STATIC_ASSERT(op##_LENGTH == length);
-#include "jsopcode.tbl"
-#undef OPDEF
-
 const JSCodeSpec js_CodeSpec[] = {
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format) \
-    {length,nuses,ndefs,format},
-#include "jsopcode.tbl"
-#undef OPDEF
+#define MAKE_CODESPEC(op,val,name,token,length,nuses,ndefs,format)  {length,nuses,ndefs,format},
+    FOR_EACH_OPCODE(MAKE_CODESPEC)
+#undef MAKE_CODESPEC
 };
 
 const unsigned js_NumCodeSpecs = JS_ARRAY_LENGTH(js_CodeSpec);
 
 /*
  * Each element of the array is either a source literal associated with JS
  * bytecode or null.
  */
 static const char * const CodeToken[] = {
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format) \
-    token,
-#include "jsopcode.tbl"
-#undef OPDEF
+#define TOKEN(op, val, name, token, ...)  token,
+    FOR_EACH_OPCODE(TOKEN)
+#undef TOKEN
 };
 
 /*
  * Array of JS bytecode names used by PC count JSON, DEBUG-only js_Disassemble
  * and JIT debug spew.
  */
 const char * const js_CodeName[] = {
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format) \
-    name,
-#include "jsopcode.tbl"
-#undef OPDEF
+#define OPNAME(op, val, name, ...)  name,
+    FOR_EACH_OPCODE(OPNAME)
+#undef OPNAME
 };
 
 /************************************************************************/
 
 #define COUNTS_LEN 16
 
 size_t
 js_GetVariableBytecodeLength(jsbytecode *pc)
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -11,25 +11,26 @@
  * JS bytecode definitions.
  */
 
 #include "jsbytecode.h"
 #include "jstypes.h"
 #include "NamespaceImports.h"
 
 #include "frontend/SourceNotes.h"
+#include "vm/Opcodes.h"
 
 /*
  * JS operation bytecodes.
  */
 typedef enum JSOp {
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format) \
-    op = val,
-#include "jsopcode.tbl"
-#undef OPDEF
+#define ENUMERATE_OPCODE(op, val, ...) op = val,
+FOR_EACH_OPCODE(ENUMERATE_OPCODE)
+#undef ENUMERATE_OPCODE
+
     JSOP_LIMIT,
 
     /*
      * These pseudo-ops help js_DecompileValueGenerator decompile JSOP_SETPROP,
      * JSOP_SETELEM, and comprehension-tails, respectively.  They are never
      * stored in bytecode, so they don't preempt valid opcodes.
      */
     JSOP_GETPROP2 = JSOP_LIMIT,
deleted file mode 100644
--- a/js/src/jsopcode.tbl
+++ /dev/null
@@ -1,530 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sw=4 et tw=0 ft=c:
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * JavaScript operation bytecodes.  If you need to allocate a bytecode, look
- * for a name of the form JSOP_UNUSED* and claim it.  Otherwise, always add at
- * the end of the table.
- *
- * When changing the bytecode, don't forget to update XDR_BYTECODE_VERSION in
- * vm/Xdr.h!
- *
- * Includers must define an OPDEF macro of the following form:
- *
- * #define OPDEF(op,val,name,image,length,nuses,ndefs,prec,format) ...
- *
- * Selected arguments can be expanded in initializers.  The op argument is
- * expanded followed by comma in the JSOp enum (jsopcode.h), e.g.  The value
- * field must be dense for now, because jsopcode.c uses an OPDEF() expansion
- * inside the js_CodeSpec[] initializer.
- *
- * Field        Description
- * op           Bytecode name, which is the JSOp enumerator name
- * value        Bytecode value, which is the JSOp enumerator value
- * name         C string containing name for disassembler
- * image        C string containing "image" for pretty-printer, null if ugly
- * length       Number of bytes including any immediate operands
- * nuses        Number of stack slots consumed by bytecode, -1 if variadic
- * ndefs        Number of stack slots produced by bytecode, -1 if variadic
- * format       Bytecode plus immediate operand encoding format
- *
- * This file is best viewed with 128 columns:
-12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
- */
-
-/* legend: op         val name          image       len use def  format */
-
-/*
- * Generic nop for the decompiler.
- */
-OPDEF(JSOP_NOP,       0,  "nop",        NULL,         1,  0,  0, JOF_BYTE)
-
-/* Long-standing JavaScript bytecodes. */
-OPDEF(JSOP_UNDEFINED, 1,  js_undefined_str, "",       1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_UNUSED2,   2,  "unused2",    NULL,         1,  1,  0, JOF_BYTE)
-OPDEF(JSOP_ENTERWITH, 3,  "enterwith",  NULL,         1,  1,  1, JOF_BYTE)
-OPDEF(JSOP_LEAVEWITH, 4,  "leavewith",  NULL,         1,  1,  0, JOF_BYTE)
-OPDEF(JSOP_RETURN,    5,  "return",     NULL,         1,  1,  0, JOF_BYTE)
-OPDEF(JSOP_GOTO,      6,  "goto",       NULL,         5,  0,  0, JOF_JUMP)
-OPDEF(JSOP_IFEQ,      7,  "ifeq",       NULL,         5,  1,  0, JOF_JUMP|JOF_DETECTING)
-OPDEF(JSOP_IFNE,      8,  "ifne",       NULL,         5,  1,  0, JOF_JUMP)
-
-/* Get the arguments object for the current, lightweight function activation. */
-OPDEF(JSOP_ARGUMENTS, 9,  "arguments",  NULL,         1,  0,  1, JOF_BYTE)
-
-OPDEF(JSOP_SWAP,      10, "swap",       NULL,         1,  2,  2, JOF_BYTE)
-OPDEF(JSOP_POPN,      11, "popn",       NULL,         3, -1,  0, JOF_UINT16)
-
-/* More long-standing bytecodes. */
-OPDEF(JSOP_DUP,       12, "dup",        NULL,         1,  1,  2, JOF_BYTE)
-OPDEF(JSOP_DUP2,      13, "dup2",       NULL,         1,  2,  4, JOF_BYTE)
-OPDEF(JSOP_SETCONST,  14, "setconst",   NULL,         5,  1,  1, JOF_ATOM|JOF_NAME|JOF_SET)
-OPDEF(JSOP_BITOR,     15, "bitor",      "|",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_BITXOR,    16, "bitxor",     "^",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_BITAND,    17, "bitand",     "&",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_EQ,        18, "eq",         "==",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH|JOF_DETECTING)
-OPDEF(JSOP_NE,        19, "ne",         "!=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH|JOF_DETECTING)
-OPDEF(JSOP_LT,        20, "lt",         "<",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_LE,        21, "le",         "<=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_GT,        22, "gt",         ">",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_GE,        23, "ge",         ">=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_LSH,       24, "lsh",        "<<",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_RSH,       25, "rsh",        ">>",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_URSH,      26, "ursh",       ">>>",        1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_ADD,       27, "add",        "+",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_SUB,       28, "sub",        "-",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_MUL,       29, "mul",        "*",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_DIV,       30, "div",        "/",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_MOD,       31, "mod",        "%",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_NOT,       32, "not",        "!",          1,  1,  1, JOF_BYTE|JOF_ARITH|JOF_DETECTING)
-OPDEF(JSOP_BITNOT,    33, "bitnot",     "~",          1,  1,  1, JOF_BYTE|JOF_ARITH)
-OPDEF(JSOP_NEG,       34, "neg",        "- ",         1,  1,  1, JOF_BYTE|JOF_ARITH)
-OPDEF(JSOP_POS,       35, "pos",        "+ ",         1,  1,  1, JOF_BYTE|JOF_ARITH)
-OPDEF(JSOP_DELNAME,   36, "delname",    NULL,         5,  0,  1, JOF_ATOM|JOF_NAME)
-OPDEF(JSOP_DELPROP,   37, "delprop",    NULL,         5,  1,  1, JOF_ATOM|JOF_PROP)
-OPDEF(JSOP_DELELEM,   38, "delelem",    NULL,         1,  2,  1, JOF_BYTE |JOF_ELEM)
-OPDEF(JSOP_TYPEOF,    39, js_typeof_str,NULL,         1,  1,  1, JOF_BYTE|JOF_DETECTING)
-OPDEF(JSOP_VOID,      40, js_void_str,  NULL,         1,  1,  1, JOF_BYTE)
-
-/* spreadcall variant of JSOP_CALL */
-OPDEF(JSOP_SPREADCALL,41, "spreadcall", NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET)
-/* spreadcall variant of JSOP_NEW */
-OPDEF(JSOP_SPREADNEW, 42, "spreadnew",  NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET)
-/* spreadcall variant of JSOP_EVAL */
-OPDEF(JSOP_SPREADEVAL,43, "spreadeval", NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET)
-
-/* Pop N values, preserving top value.  */
-OPDEF(JSOP_POPNV,     44, "popnv",      NULL,         3, -1,  1,  JOF_UINT16)
-
-OPDEF(JSOP_UNUSED45,  45, "unused45",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED46,  46, "unused46",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED47,  47, "unused47",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED48,  48, "unused48",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED49,  49, "unused49",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED50,  50, "unused50",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED51,  51, "unused51",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED52,  52, "unused52",   NULL,         1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_GETPROP,   53, "getprop",    NULL,         5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3)
-OPDEF(JSOP_SETPROP,   54, "setprop",    NULL,         5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING|JOF_TMPSLOT)
-OPDEF(JSOP_GETELEM,   55, "getelem",    NULL,         1,  2,  1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC)
-OPDEF(JSOP_SETELEM,   56, "setelem",    NULL,         1,  3,  1, JOF_BYTE |JOF_ELEM|JOF_SET|JOF_DETECTING)
-OPDEF(JSOP_CALLNAME,  57, "callname",   NULL,         5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_CALL,      58, "call",       NULL,         3, -1,  1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET)
-OPDEF(JSOP_NAME,      59, "name",       NULL,         5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_DOUBLE,    60, "double",     NULL,         5,  0,  1, JOF_DOUBLE)
-OPDEF(JSOP_STRING,    61, "string",     NULL,         5,  0,  1, JOF_ATOM)
-OPDEF(JSOP_ZERO,      62, "zero",       "0",          1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_ONE,       63, "one",        "1",          1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_NULL,      64, js_null_str,  js_null_str,  1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_THIS,      65, js_this_str,  js_this_str,  1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_FALSE,     66, js_false_str, js_false_str, 1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_TRUE,      67, js_true_str,  js_true_str,  1,  0,  1, JOF_BYTE)
-OPDEF(JSOP_OR,        68, "or",         NULL,         5,  1,  1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC)
-OPDEF(JSOP_AND,       69, "and",        NULL,         5,  1,  1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC)
-
-/* The switch bytecodes have variable length. */
-OPDEF(JSOP_TABLESWITCH, 70, "tableswitch", NULL,     -1,  1,  0,  JOF_TABLESWITCH|JOF_DETECTING)
-
-/*
- * Prologue emitted in scripts expected to run once, which deoptimizes code if
- * it executes multiple times.
- */
-OPDEF(JSOP_RUNONCE,   71, "runonce",    NULL,         1,  0,  0,  JOF_BYTE)
-
-/* New, infallible/transitive identity ops. */
-OPDEF(JSOP_STRICTEQ,  72, "stricteq",   "===",        1,  2,  1, JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC|JOF_ARITH)
-OPDEF(JSOP_STRICTNE,  73, "strictne",   "!==",        1,  2,  1, 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,
- * an opcode that always throws.
- */
-OPDEF(JSOP_SETCALL,   74, "setcall",    NULL,         1,  0,  0, JOF_BYTE)
-
-/*
- * JSOP_ITER sets up a for-in or for-each-in loop using the JSITER_* flag bits
- * in this op's uint8_t immediate operand. It replaces the top of stack value
- * with an iterator for that value.
- *
- * JSOP_MOREITER stores the next iterated value into cx->iterValue and pushes
- * true if another value is available, and false otherwise. It is followed
- * immediately by JSOP_IFNE.
- *
- * JSOP_ENDITER cleans up after the loop. It uses the slot above the iterator
- * for temporary GC rooting.
- */
-OPDEF(JSOP_ITER,      75, "iter",       NULL,         2,  1,  1,  JOF_UINT8)
-OPDEF(JSOP_MOREITER,  76, "moreiter",   NULL,         1,  1,  2,  JOF_BYTE)
-OPDEF(JSOP_ITERNEXT,  77, "iternext",   "<next>",     1,  0,  1,  JOF_BYTE)
-OPDEF(JSOP_ENDITER,   78, "enditer",    NULL,         1,  1,  0,  JOF_BYTE)
-
-OPDEF(JSOP_FUNAPPLY,  79, "funapply",   NULL,         3, -1,  1,  JOF_UINT16|JOF_INVOKE|JOF_TYPESET)
-
-/* Push object initializer literal. */
-OPDEF(JSOP_OBJECT,    80, "object",     NULL,         5,  0,  1,  JOF_OBJECT)
-
-/* Pop value and discard it. */
-OPDEF(JSOP_POP,       81, "pop",        NULL,         1,  1,  0,  JOF_BYTE)
-
-/* Call a function as a constructor; operand is argc. */
-OPDEF(JSOP_NEW,       82, js_new_str,   NULL,         3, -1,  1,  JOF_UINT16|JOF_INVOKE|JOF_TYPESET)
-
-OPDEF(JSOP_SPREAD,    83, "spread",     NULL,         1,  3,  2,  JOF_BYTE|JOF_ELEM|JOF_SET)
-
-/* Fast get/set ops for function arguments and local variables. */
-OPDEF(JSOP_GETARG,    84, "getarg",     NULL,         3,  0,  1,  JOF_QARG |JOF_NAME)
-OPDEF(JSOP_SETARG,    85, "setarg",     NULL,         3,  1,  1,  JOF_QARG |JOF_NAME|JOF_SET)
-OPDEF(JSOP_GETLOCAL,  86,"getlocal",    NULL,         4,  0,  1,  JOF_LOCAL|JOF_NAME)
-OPDEF(JSOP_SETLOCAL,  87,"setlocal",    NULL,         4,  1,  1,  JOF_LOCAL|JOF_NAME|JOF_SET|JOF_DETECTING)
-
-/* Push unsigned 16-bit int constant. */
-OPDEF(JSOP_UINT16,    88, "uint16",     NULL,         3,  0,  1,  JOF_UINT16)
-
-/*
- * Object and array literal support.  NEWINIT takes the kind of initializer
- * (JSProto_Array or JSProto_Object).  NEWARRAY is an array initializer
- * taking the final length, which can be filled in at the start and initialized
- * directly.  NEWOBJECT is an object initializer taking an object with the final
- * shape, which can be set at the start and slots then filled in directly.
- * NEWINIT has an extra byte so it can be exchanged with NEWOBJECT during emit.
- */
-OPDEF(JSOP_NEWINIT,   89, "newinit",    NULL,         5,  0,  1, JOF_UINT8)
-OPDEF(JSOP_NEWARRAY,  90, "newarray",   NULL,         4,  0,  1, JOF_UINT24)
-OPDEF(JSOP_NEWOBJECT, 91, "newobject",  NULL,         5,  0,  1, JOF_OBJECT)
-OPDEF(JSOP_ENDINIT,   92, "endinit",    NULL,         1,  0,  0, JOF_BYTE)
-OPDEF(JSOP_INITPROP,  93, "initprop",   NULL,         5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING)
-
-/* Initialize a numeric property in an object literal, like {1: x}. */
-OPDEF(JSOP_INITELEM,  94, "initelem",   NULL,         1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING)
-
-/* Used in array literals with spread. */
-OPDEF(JSOP_INITELEM_INC,95, "initelem_inc", NULL,     1,  3,  2, JOF_BYTE|JOF_ELEM|JOF_SET)
-
-/* Initialize an array element. */
-OPDEF(JSOP_INITELEM_ARRAY,96, "initelem_array", NULL, 4,  2,  1,  JOF_UINT24|JOF_ELEM|JOF_SET|JOF_DETECTING)
-
-/*
- * Initialize a getter/setter in an object literal. The INITELEM* ops are used
- * for numeric properties like {get 2() {}}.
- */
-OPDEF(JSOP_INITPROP_GETTER,  97, "initprop_getter",   NULL, 5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING)
-OPDEF(JSOP_INITPROP_SETTER,  98, "initprop_setter",   NULL, 5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING)
-OPDEF(JSOP_INITELEM_GETTER,  99, "initelem_getter",   NULL, 1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING)
-OPDEF(JSOP_INITELEM_SETTER, 100, "initelem_setter",   NULL, 1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING)
-
-OPDEF(JSOP_UNUSED101,  101, "unused101",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED102,  102, "unused102",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED103,  103, "unused103",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED104,  104, "unused104",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED105,  105, "unused105",   NULL,         1,  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,  JOF_JUMP)
-
-OPDEF(JSOP_UNUSED107, 107,"unused107",  NULL,         1,  0,  0,  JOF_BYTE)
-
-/* Like JSOP_FUNAPPLY but for f.call instead of f.apply. */
-OPDEF(JSOP_FUNCALL,   108,"funcall",    NULL,         3, -1,  1, 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,  JOF_BYTE)
-
-/* ECMA-compliant assignment ops. */
-OPDEF(JSOP_BINDNAME,  110,"bindname",   NULL,         5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_SET)
-OPDEF(JSOP_SETNAME,   111,"setname",    NULL,         5,  2,  1,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING)
-
-/* Exception handling ops. */
-OPDEF(JSOP_THROW,     112,js_throw_str, NULL,         1,  1,  0,  JOF_BYTE)
-
-/* 'in' and 'instanceof' ops. */
-OPDEF(JSOP_IN,        113,js_in_str,    js_in_str,    1,  2,  1, JOF_BYTE|JOF_LEFTASSOC)
-OPDEF(JSOP_INSTANCEOF,114,js_instanceof_str,js_instanceof_str,1,2,1,JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT)
-
-/* debugger op */
-OPDEF(JSOP_DEBUGGER,  115,"debugger",   NULL,         1,  0,  0, JOF_BYTE)
-
-/* gosub/retsub for finally handling */
-OPDEF(JSOP_GOSUB,     116,"gosub",      NULL,         5,  0,  0,  JOF_JUMP)
-OPDEF(JSOP_RETSUB,    117,"retsub",     NULL,         1,  2,  0,  JOF_BYTE)
-
-/* More exception handling ops. */
-OPDEF(JSOP_EXCEPTION, 118,"exception",  NULL,         1,  0,  1,  JOF_BYTE)
-
-/* Embedded lineno to speedup pc->line mapping. */
-OPDEF(JSOP_LINENO,    119,"lineno",     NULL,         3,  0,  0,  JOF_UINT16)
-
-/*
- * ECMA-compliant switch statement ops.
- * CONDSWITCH is a decompilable NOP; CASE is ===, POP, jump if true, re-push
- * lval if false; and DEFAULT is POP lval and GOTO.
- */
-OPDEF(JSOP_CONDSWITCH,120,"condswitch", NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_CASE,      121,"case",       NULL,         5,  2,  1,  JOF_JUMP)
-OPDEF(JSOP_DEFAULT,   122,"default",    NULL,         5,  1,  0,  JOF_JUMP)
-
-/*
- * ECMA-compliant call to eval op
- */
-OPDEF(JSOP_EVAL,      123,"eval",       NULL,         3, -1,  1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET)
-
-OPDEF(JSOP_UNUSED124,  124, "unused124", NULL,      1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED125,  125, "unused125", NULL,      1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED126,  126, "unused126", NULL,      1,  0,  0,  JOF_BYTE)
-
-/*
- * Prolog bytecodes for defining function, var, and const names.
- */
-OPDEF(JSOP_DEFFUN,    127,"deffun",     NULL,         5,  0,  0,  JOF_OBJECT)
-OPDEF(JSOP_DEFCONST,  128,"defconst",   NULL,         5,  0,  0,  JOF_ATOM)
-OPDEF(JSOP_DEFVAR,    129,"defvar",     NULL,         5,  0,  0,  JOF_ATOM)
-
-/* Push a closure for a named or anonymous function expression. */
-OPDEF(JSOP_LAMBDA,    130, "lambda",    NULL,         5,  0,  1, JOF_OBJECT)
-
-/* Used for named function expression self-naming, if lightweight. */
-OPDEF(JSOP_CALLEE,    131, "callee",    NULL,         1,  0,  1, JOF_BYTE)
-
-OPDEF(JSOP_UNUSED132, 132, "unused132", NULL,         1,  0,  0,  JOF_BYTE)
-
-/* Pick an element from the stack. */
-OPDEF(JSOP_PICK,        133, "pick",      NULL,       2,  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.
- */
-OPDEF(JSOP_TRY,         134,"try",        NULL,       1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_FINALLY,     135,"finally",    NULL,       1,  0,  2,  JOF_BYTE)
-
-/*
- * An "aliased variable" is a var, let, or formal arg that is aliased. Sources
- * of aliasing include: nested functions accessing the vars of an enclosing
- * function, function statements that are conditionally executed, 'eval',
- * 'with', and 'arguments'. All of these cases require creating a CallObject to
- * own the aliased variable.
- *
- * An ALIASEDVAR opcode contains the following immediates:
- *  uint8 hops:  the number of scope objects to skip to find the ScopeObject
- *               containing the variable being accessed
- *  uint24 slot: the slot containing the variable in the ScopeObject (this
- *               'slot' does not include RESERVED_SLOTS).
- */
-OPDEF(JSOP_GETALIASEDVAR, 136,"getaliasedvar",NULL,   5,  0,  1, JOF_SCOPECOORD|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_CALLALIASEDVAR,137,"callaliasedvar",NULL,  5,  0,  1, JOF_SCOPECOORD|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_SETALIASEDVAR, 138,"setaliasedvar",NULL,   5,  1,  1, JOF_SCOPECOORD|JOF_NAME|JOF_SET|JOF_DETECTING)
-
-OPDEF(JSOP_UNUSED139,  139, "unused139",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED140,  140, "unused140",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED141,  141, "unused141",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED142,  142, "unused142",   NULL,         1,  0,  0,  JOF_BYTE)
-
-/*
- * Intrinsic names are emitted instead of JSOP_*NAME ops when the
- * CompileOptions flag "selfHostingMode" is set.
- *
- * They are used in self-hosted code to access other self-hosted values and
- * intrinsic functions the runtime doesn't give client JS code access to.
- */
-OPDEF(JSOP_GETINTRINSIC,  143, "getintrinsic",  NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_CALLINTRINSIC, 144, "callintrinsic", NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET)
-OPDEF(JSOP_SETINTRINSIC,  145, "setintrinsic",  NULL, 5,  2,  1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING)
-OPDEF(JSOP_BINDINTRINSIC, 146, "bindintrinsic", NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_SET)
-
-/* Unused. */
-OPDEF(JSOP_UNUSED147,     147,"unused147", NULL,      1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED148,     148,"unused148", NULL,      1,  0,  0,  JOF_BYTE)
-
-/* Placeholders for a real jump opcode set during backpatch chain fixup. */
-OPDEF(JSOP_BACKPATCH,     149,"backpatch", NULL,      5,  0,  0,  JOF_JUMP)
-OPDEF(JSOP_UNUSED150,     150,"unused150", NULL,      1,  0,  0,  JOF_BYTE)
-
-/* Set pending exception from the stack, to trigger rethrow. */
-OPDEF(JSOP_THROWING,      151,"throwing", NULL,       1,  1,  0,  JOF_BYTE)
-
-/* Set the return value pseudo-register in stack frame. */
-OPDEF(JSOP_SETRVAL,       152,"setrval",    NULL,       1,  1,  0,  JOF_BYTE)
-/*
- * Stop interpretation and return value set by JSOP_SETRVAL. When not set,
- * returns UndefinedValue. Also emitted at end of script so interpreter
- * don't need to check if opcode is still in script range.
- */
-OPDEF(JSOP_RETRVAL,       153,"retrval",    NULL,       1,  0,  0,  JOF_BYTE)
-
-/* Free variable references that must either be found on the global or a ReferenceError */
-OPDEF(JSOP_GETGNAME,      154,"getgname",  NULL,       5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME)
-OPDEF(JSOP_SETGNAME,      155,"setgname",  NULL,       5,  2,  1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING|JOF_GNAME)
-
-OPDEF(JSOP_UNUSED156,  156, "unused156",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED157,  157, "unused157",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED158,  158, "unused158",   NULL,         1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED159,  159, "unused159",   NULL,         1,  0,  0,  JOF_BYTE)
-
-/* Regular expression literal requiring special "fork on exec" handling. */
-OPDEF(JSOP_REGEXP,        160,"regexp",   NULL,       5,  0,  1, JOF_REGEXP)
-
-OPDEF(JSOP_UNUSED161,     161,"unused161",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED162,     162,"unused162",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED163,     163,"unused163",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED164,     164,"unused164",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED165,     165,"unused165",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED166,     166,"unused166",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED167,     167,"unused167",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED168,     168,"unused168",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED169,     169,"unused169",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED170,     170,"unused170",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED171,     171,"unused171",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED172,     172,"unused172",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED173,     173,"unused173",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED174,     174,"unused174",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED175,     175,"unused175",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED176,     176,"unused176",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED177,     177,"unused177",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED178,     178,"unused178",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED179,     179,"unused179",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED180,     180,"unused180",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED181,     181,"unused181",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED182,     182,"unused182",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED183,     183,"unused183",  NULL,     1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_CALLPROP,      184,"callprop",   NULL,     5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3)
-
-OPDEF(JSOP_UNUSED185,     185,"unused185",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED186,     186,"unused186",  NULL,     1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED187,     187,"unused187",  NULL,     1,  0,  0,  JOF_BYTE)
-
-/*
- * Opcode to hold 24-bit immediate integer operands.
- */
-OPDEF(JSOP_UINT24,        188,"uint24",     NULL,     4,  0,  1, JOF_UINT24)
-
-OPDEF(JSOP_UNUSED189,     189,"unused189",   NULL,    1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED190,     190,"unused190",   NULL,    1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED191,     191,"unused191",   NULL,    1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED192,     192,"unused192",   NULL,    1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_CALLELEM,      193, "callelem",   NULL,    1,  2,  1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC)
-
-/* __proto__: v inside an object initializer. */
-OPDEF(JSOP_MUTATEPROTO,   194, "mutateproto",NULL,    1,  2,  1, JOF_BYTE)
-
-/*
- * Get an extant property value, throwing ReferenceError if the identified
- * property does not exist.
- */
-OPDEF(JSOP_GETXPROP,      195,"getxprop",    NULL,    5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET)
-
-OPDEF(JSOP_UNUSED196,     196,"unused196",   NULL,    1,  0,  0, JOF_BYTE)
-
-/*
- * Specialized JSOP_TYPEOF to avoid reporting undefined for typeof(0, undef).
- */
-OPDEF(JSOP_TYPEOFEXPR,    197,"typeofexpr",  NULL,    1,  1,  1, JOF_BYTE|JOF_DETECTING)
-
-/*
- * Block-local scope support.
- */
-OPDEF(JSOP_PUSHBLOCKSCOPE,198,"pushblockscope", NULL, 5,  0,  0,  JOF_OBJECT)
-OPDEF(JSOP_POPBLOCKSCOPE, 199,"popblockscope", NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_DEBUGLEAVEBLOCK, 200,"debugleaveblock", NULL, 1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_UNUSED201,     201,"unused201",  NULL,     1,  0,  0,  JOF_BYTE)
-
-/*
- * Generator and array comprehension support.
- */
-OPDEF(JSOP_GENERATOR,     202,"generator",   NULL,    1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_YIELD,         203,"yield",       NULL,    1,  1,  1,  JOF_BYTE)
-OPDEF(JSOP_ARRAYPUSH,     204,"arraypush",   NULL,    1,  2,  0,  JOF_BYTE)
-
-OPDEF(JSOP_UNUSED205,     205, "unused205",    NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED206,     206, "unused206",    NULL,  1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_UNUSED207,     207, "unused207",    NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED208,     208, "unused208",    NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED209,     209, "unused209",    NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED210,     210, "unused210",    NULL,  1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_CALLGNAME,     211, "callgname",    NULL,  5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME)
-OPDEF(JSOP_CALLLOCAL,     212, "calllocal",    NULL,  4,  0,  1,  JOF_LOCAL|JOF_NAME)
-OPDEF(JSOP_CALLARG,       213, "callarg",      NULL,  3,  0,  1,  JOF_QARG |JOF_NAME)
-OPDEF(JSOP_BINDGNAME,     214, "bindgname",    NULL,  5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_GNAME)
-
-/*
- * Opcodes to hold 8-bit and 32-bit immediate integer operands.
- */
-OPDEF(JSOP_INT8,          215, "int8",         NULL,  2,  0,  1, JOF_INT8)
-OPDEF(JSOP_INT32,         216, "int32",        NULL,  5,  0,  1, JOF_INT32)
-
-/*
- * Get the value of the 'length' property from a stacked object.
- */
-OPDEF(JSOP_LENGTH,        217, "length",       NULL,  5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3)
-
-/*
- * 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,  JOF_BYTE)
-
-OPDEF(JSOP_UNUSED219,     219,"unused219",     NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED220,     220,"unused220",     NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED221,     221,"unused221",     NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED222,     222,"unused222",     NULL,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_UNUSED223,     223,"unused223",     NULL,  1,  0,  0,  JOF_BYTE)
-
-OPDEF(JSOP_REST,          224, "rest",         NULL,  1,  0,  1,  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,  JOF_BYTE)
-
-/* Push the implicit 'this' value for calls to the associated name. */
-OPDEF(JSOP_IMPLICITTHIS,  226, "implicitthis", "",    5,  0,  1,  JOF_ATOM)
-
-/*
- * This opcode is the target of the entry jump for some loop. The uint8 argument
- * is the loop depth. This value starts at 1 and is just a hint: deeply
- * nested loops all have the same value.
- */
-OPDEF(JSOP_LOOPENTRY,     227, "loopentry",    NULL,  2,  0,  0,  JOF_UINT8)
-
-/*
- * Pad out the unused opcode space to the nearest power-of-two boundary. The
- * interpreter uses this to construct a table which is a power-of-two size.
- */
-#ifdef OPPAD
-OPPAD(228)
-OPPAD(229)
-OPPAD(230)
-OPPAD(231)
-OPPAD(232)
-OPPAD(233)
-OPPAD(234)
-OPPAD(235)
-OPPAD(236)
-OPPAD(237)
-OPPAD(238)
-OPPAD(239)
-OPPAD(240)
-OPPAD(241)
-OPPAD(242)
-OPPAD(243)
-OPPAD(244)
-OPPAD(245)
-OPPAD(246)
-OPPAD(247)
-OPPAD(248)
-OPPAD(249)
-OPPAD(250)
-OPPAD(251)
-OPPAD(252)
-OPPAD(253)
-OPPAD(254)
-OPPAD(255)
-#endif
deleted file mode 100644
--- a/js/src/jsoplengen.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static const struct {
-    const char  *name;
-    int         length;
-} pairs[] = {
-#define OPDEF(op,val,name,token,length,nuses,ndefs,format)               \
-    { #op, length } ,
-#include "jsopcode.tbl"
-#undef OPDEF
-};
-
-int
-main(int argc, char **argv)
-{
-    FILE *fp;
-    size_t maxNameWidth, i, nameWidth, tabStop;
-    int lengthGap;
-
-    static const char prefix[] = "#define ";
-    static const char suffix[] = "_LENGTH";
-    static const size_t tabWidth = 8;
-    static const size_t prefixWidth = sizeof(prefix) - 1;
-    static const size_t suffixWidth = sizeof(suffix) - 1;
-
-    if (argc != 2) {
-        fputs("Bad usage\n", stderr);
-        return EXIT_FAILURE;
-    }
-
-    fp = fopen(argv[1], "w");
-    if (!fp) {
-        perror("fopen");
-        return EXIT_FAILURE;
-    }
-    fputs("#ifndef JSAUTOOPLEN_H___\n", fp);
-    fputs("#define JSAUTOOPLEN_H___\n", fp);
-    fputs("/*\n"
-          " * Automatically generated header with JS opcode length constants.\n"
-          " *\n"
-          " * Do not edit it, alter jsopcode.tbl instead.\n"
-          " */\n",
-          fp);
-
-    /*
-     * Print
-     *
-     * #define name_LENGTH length
-     *
-     * with all length values aligned on the same column. The column is at the
-     * second character position after a tab-stop with the first position
-     * reserved for the minus sign of variable-length opcodes.
-     */
-    maxNameWidth = 0;
-    for (i = 0; i != sizeof pairs / sizeof pairs[0]; ++i) {
-        nameWidth = strlen(pairs[i].name);
-        if (maxNameWidth < nameWidth)
-            maxNameWidth = nameWidth;
-    }
-
-    tabStop = prefixWidth + maxNameWidth + suffixWidth + 1;
-    tabStop = (tabStop + tabWidth - 1) / tabWidth * tabWidth;
-    for (i = 0; i != sizeof pairs / sizeof pairs[0]; ++i) {
-        lengthGap = (int) (tabStop - prefixWidth - strlen(pairs[i].name) -
-                           suffixWidth);
-        fprintf(fp, "%s%s%s%*c%2d\n",
-                prefix, pairs[i].name, suffix, lengthGap, ' ',
-                pairs[i].length);
-        if (ferror(fp)) {
-            perror("fclose");
-            exit(EXIT_FAILURE);
-        }
-    }
-
-    fputs("#endif  // JSAUTOOPLEN_H___\n", fp);
-
-    if (fclose(fp)) {
-        perror("fclose");
-        return EXIT_FAILURE;
-    }
-
-    return EXIT_SUCCESS;
-}
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -13,17 +13,16 @@
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/PodOperations.h"
 
 #include <string.h>
 
 #include "jsapi.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jstypes.h"
 #include "jsutil.h"
 #include "jswrapper.h"
@@ -32,16 +31,17 @@
 #include "frontend/SharedContext.h"
 #include "gc/Marking.h"
 #include "jit/BaselineJIT.h"
 #include "jit/IonCode.h"
 #include "js/OldDebugAPI.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/Compression.h"
 #include "vm/Debugger.h"
+#include "vm/Opcodes.h"
 #include "vm/Shape.h"
 #include "vm/Xdr.h"
 
 #include "jsfuninlines.h"
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 
 #include "vm/ScopeObject-inl.h"
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -23,30 +23,30 @@
 #include "mozilla/PodOperations.h"
 
 #include <ctype.h>
 #include <string.h>
 
 #include "jsapi.h"
 #include "jsarray.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jsbool.h"
 #include "jscntxt.h"
 #include "jsgc.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "builtin/RegExp.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/NumericConversions.h"
+#include "vm/Opcodes.h"
 #include "vm/RegExpObject.h"
 #include "vm/RegExpStatics.h"
 #include "vm/ScopeObject.h"
 #include "vm/StringBuffer.h"
 
 #include "jsinferinlines.h"
 
 #include "vm/Interpreter-inl.h"
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -377,17 +377,16 @@ else:
     SOURCES += [
         'perf/pm_stub.cpp'
     ]
 
 MSVC_ENABLE_PGO = True
 
 HOST_SOURCES += [
     'jskwgen.cpp',
-    'jsoplengen.cpp',
 ]
 
 HOST_SIMPLE_PROGRAMS += [
     'host_%s' % f.replace('.cpp', '') for f in HOST_SOURCES
 ]
 
 # JavaScript must be built shared, even for static builds, as it is used by
 # other modules which are always built shared. Failure to do so results in
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -13,17 +13,16 @@
 #include "mozilla/DebugOnly.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/PodOperations.h"
 
 #include <string.h>
 
 #include "jsarray.h"
 #include "jsatom.h"
-#include "jsautooplen.h"
 #include "jscntxt.h"
 #include "jsfun.h"
 #include "jsgc.h"
 #include "jsiter.h"
 #include "jslibmath.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jsopcode.h"
@@ -34,16 +33,17 @@
 #include "TraceLogging.h"
 #endif
 
 #include "builtin/Eval.h"
 #include "jit/BaselineJIT.h"
 #include "jit/Ion.h"
 #include "js/OldDebugAPI.h"
 #include "vm/Debugger.h"
+#include "vm/Opcodes.h"
 #include "vm/Shape.h"
 
 #include "jsatominlines.h"
 #include "jsboolinlines.h"
 #include "jsfuninlines.h"
 #include "jsinferinlines.h"
 #include "jsscriptinlines.h"
 
@@ -1336,24 +1336,25 @@ Interpret(JSContext *cx, RunState &state
 # define DEFAULT()                label_default:
 # define DISPATCH_TO(OP)          goto *addresses[(OP)]
 
 # define LABEL(X)                 (&&label_##X)
 
     // Use addresses instead of offsets to optimize for runtime speed over
     // load-time relocation overhead.
     static const void *const addresses[EnableInterruptsPseudoOpcode + 1] = {
-# define OPDEF(op,v,n,t,l,u,d,f)  LABEL(op),
-# define OPPAD(v)                                                             \
+# define OPCODE_LABEL(op, ...)  LABEL(op),
+        FOR_EACH_OPCODE(OPCODE_LABEL)
+# undef OPCODE_LABEL
+# define TRAILING_LABEL(v)                                                    \
     ((v) == EnableInterruptsPseudoOpcode                                      \
      ? LABEL(EnableInterruptsPseudoOpcode)                                    \
      : LABEL(default)),
-# include "jsopcode.tbl"
-# undef OPDEF
-# undef OPPAD
+        FOR_EACH_TRAILING_UNUSED_OPCODE(TRAILING_LABEL)
+# undef TRAILING_LABEL
     };
 #else
 // Portable switch-based dispatch.
 # define INTERPRETER_LOOP()       the_switch: switch (switchOp)
 # define CASE(OP)                 case OP:
 # define DEFAULT()                default:
 # define DISPATCH_TO(OP)                                                      \
     JS_BEGIN_MACRO                                                            \
new file mode 100644
--- /dev/null
+++ b/js/src/vm/Opcodes.h
@@ -0,0 +1,547 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=0 ft=c:
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef vm_Opcodes_h
+#define vm_Opcodes_h
+
+#include "mozilla/Attributes.h"
+
+#include <stddef.h>
+
+/*
+ * JavaScript operation bytecodes.  Add a new bytecode by claiming one of the
+ * JSOP_UNUSED* here or by extracting the first unused opcode from
+ * FOR_EACH_TRAILING_UNUSED_OPCODE and updating js::detail::LastDefinedOpcode
+ * below.
+ *
+ * When changing the bytecode, don't forget to update XDR_BYTECODE_VERSION in
+ * vm/Xdr.h!
+ *
+ * Includers must define a macro with the following form:
+ *
+ * #define MACRO(op,val,name,image,length,nuses,ndefs,format) ...
+ *
+ * Then simply use FOR_EACH_OPCODE(MACRO) to invoke MACRO for every opcode.
+ * Selected arguments can be expanded in initializers.
+ *
+ * Field        Description
+ * op           Bytecode name, which is the JSOp enumerator name
+ * value        Bytecode value, which is the JSOp enumerator value
+ * name         C string containing name for disassembler
+ * image        C string containing "image" for pretty-printer, null if ugly
+ * length       Number of bytes including any immediate operands
+ * nuses        Number of stack slots consumed by bytecode, -1 if variadic
+ * ndefs        Number of stack slots produced by bytecode, -1 if variadic
+ * format       Bytecode plus immediate operand encoding format
+ *
+ * This file is best viewed with 128 columns:
+12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+ */
+
+#define FOR_EACH_OPCODE(macro) \
+    /* legend:  op      val   name          image       len use def  format */ \
+    macro(JSOP_NOP,       0,  "nop",        NULL,         1,  0,  0, JOF_BYTE) \
+    \
+    /* Long-standing JavaScript bytecodes. */ \
+    macro(JSOP_UNDEFINED, 1,  js_undefined_str, "",       1,  0,  1, JOF_BYTE) \
+    macro(JSOP_UNUSED2,   2,  "unused2",    NULL,         1,  1,  0, JOF_BYTE) \
+    macro(JSOP_ENTERWITH, 3,  "enterwith",  NULL,         1,  1,  1, JOF_BYTE) \
+    macro(JSOP_LEAVEWITH, 4,  "leavewith",  NULL,         1,  1,  0, JOF_BYTE) \
+    macro(JSOP_RETURN,    5,  "return",     NULL,         1,  1,  0, JOF_BYTE) \
+    macro(JSOP_GOTO,      6,  "goto",       NULL,         5,  0,  0, JOF_JUMP) \
+    macro(JSOP_IFEQ,      7,  "ifeq",       NULL,         5,  1,  0, JOF_JUMP|JOF_DETECTING) \
+    macro(JSOP_IFNE,      8,  "ifne",       NULL,         5,  1,  0, JOF_JUMP) \
+    \
+    /* Get the arguments object for the current, lightweight function activation. */ \
+    macro(JSOP_ARGUMENTS, 9,  "arguments",  NULL,         1,  0,  1, JOF_BYTE) \
+    \
+    macro(JSOP_SWAP,      10, "swap",       NULL,         1,  2,  2, JOF_BYTE) \
+    macro(JSOP_POPN,      11, "popn",       NULL,         3, -1,  0, JOF_UINT16) \
+    \
+    /* More long-standing bytecodes. */ \
+    macro(JSOP_DUP,       12, "dup",        NULL,         1,  1,  2, JOF_BYTE) \
+    macro(JSOP_DUP2,      13, "dup2",       NULL,         1,  2,  4, JOF_BYTE) \
+    macro(JSOP_SETCONST,  14, "setconst",   NULL,         5,  1,  1, JOF_ATOM|JOF_NAME|JOF_SET) \
+    macro(JSOP_BITOR,     15, "bitor",      "|",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_BITXOR,    16, "bitxor",     "^",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_BITAND,    17, "bitand",     "&",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_EQ,        18, "eq",         "==",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH|JOF_DETECTING) \
+    macro(JSOP_NE,        19, "ne",         "!=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH|JOF_DETECTING) \
+    macro(JSOP_LT,        20, "lt",         "<",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_LE,        21, "le",         "<=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_GT,        22, "gt",         ">",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_GE,        23, "ge",         ">=",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_LSH,       24, "lsh",        "<<",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_RSH,       25, "rsh",        ">>",         1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_URSH,      26, "ursh",       ">>>",        1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_ADD,       27, "add",        "+",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_SUB,       28, "sub",        "-",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_MUL,       29, "mul",        "*",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_DIV,       30, "div",        "/",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_MOD,       31, "mod",        "%",          1,  2,  1, JOF_BYTE|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_NOT,       32, "not",        "!",          1,  1,  1, JOF_BYTE|JOF_ARITH|JOF_DETECTING) \
+    macro(JSOP_BITNOT,    33, "bitnot",     "~",          1,  1,  1, JOF_BYTE|JOF_ARITH) \
+    macro(JSOP_NEG,       34, "neg",        "- ",         1,  1,  1, JOF_BYTE|JOF_ARITH) \
+    macro(JSOP_POS,       35, "pos",        "+ ",         1,  1,  1, JOF_BYTE|JOF_ARITH) \
+    macro(JSOP_DELNAME,   36, "delname",    NULL,         5,  0,  1, JOF_ATOM|JOF_NAME) \
+    macro(JSOP_DELPROP,   37, "delprop",    NULL,         5,  1,  1, JOF_ATOM|JOF_PROP) \
+    macro(JSOP_DELELEM,   38, "delelem",    NULL,         1,  2,  1, JOF_BYTE |JOF_ELEM) \
+    macro(JSOP_TYPEOF,    39, js_typeof_str,NULL,         1,  1,  1, JOF_BYTE|JOF_DETECTING) \
+    macro(JSOP_VOID,      40, js_void_str,  NULL,         1,  1,  1, JOF_BYTE) \
+    \
+    /* spreadcall variant of JSOP_CALL */ \
+    macro(JSOP_SPREADCALL,41, "spreadcall", NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \
+    /* spreadcall variant of JSOP_NEW */ \
+    macro(JSOP_SPREADNEW, 42, "spreadnew",  NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \
+    /* spreadcall variant of JSOP_EVAL */ \
+    macro(JSOP_SPREADEVAL,43, "spreadeval", NULL,         1,  3,  1, JOF_BYTE|JOF_INVOKE|JOF_TYPESET) \
+    \
+    /* Pop N values, preserving top value. */ \
+    macro(JSOP_POPNV,     44, "popnv",      NULL,         3, -1,  1,  JOF_UINT16) \
+    \
+    macro(JSOP_UNUSED45,  45, "unused45",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED46,  46, "unused46",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED47,  47, "unused47",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED48,  48, "unused48",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED49,  49, "unused49",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED50,  50, "unused50",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED51,  51, "unused51",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED52,  52, "unused52",   NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_GETPROP,   53, "getprop",    NULL,         5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \
+    macro(JSOP_SETPROP,   54, "setprop",    NULL,         5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING|JOF_TMPSLOT) \
+    macro(JSOP_GETELEM,   55, "getelem",    NULL,         1,  2,  1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC) \
+    macro(JSOP_SETELEM,   56, "setelem",    NULL,         1,  3,  1, JOF_BYTE |JOF_ELEM|JOF_SET|JOF_DETECTING) \
+    macro(JSOP_CALLNAME,  57, "callname",   NULL,         5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_CALL,      58, "call",       NULL,         3, -1,  1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \
+    macro(JSOP_NAME,      59, "name",       NULL,         5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_DOUBLE,    60, "double",     NULL,         5,  0,  1, JOF_DOUBLE) \
+    macro(JSOP_STRING,    61, "string",     NULL,         5,  0,  1, JOF_ATOM) \
+    macro(JSOP_ZERO,      62, "zero",       "0",          1,  0,  1, JOF_BYTE) \
+    macro(JSOP_ONE,       63, "one",        "1",          1,  0,  1, JOF_BYTE) \
+    macro(JSOP_NULL,      64, js_null_str,  js_null_str,  1,  0,  1, JOF_BYTE) \
+    macro(JSOP_THIS,      65, js_this_str,  js_this_str,  1,  0,  1, JOF_BYTE) \
+    macro(JSOP_FALSE,     66, js_false_str, js_false_str, 1,  0,  1, JOF_BYTE) \
+    macro(JSOP_TRUE,      67, js_true_str,  js_true_str,  1,  0,  1, JOF_BYTE) \
+    macro(JSOP_OR,        68, "or",         NULL,         5,  1,  1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC) \
+    macro(JSOP_AND,       69, "and",        NULL,         5,  1,  1, JOF_JUMP|JOF_DETECTING|JOF_LEFTASSOC) \
+    \
+    /* The switch bytecodes have variable length. */ \
+    macro(JSOP_TABLESWITCH, 70, "tableswitch", NULL,     -1,  1,  0,  JOF_TABLESWITCH|JOF_DETECTING) \
+    \
+    /*
+     * Prologue emitted in scripts expected to run once, which deoptimizes code if
+     * it executes multiple times.
+     */ \
+    macro(JSOP_RUNONCE,   71, "runonce",    NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* New, infallible/transitive identity ops. */ \
+    macro(JSOP_STRICTEQ,  72, "stricteq",   "===",        1,  2,  1, JOF_BYTE|JOF_DETECTING|JOF_LEFTASSOC|JOF_ARITH) \
+    macro(JSOP_STRICTNE,  73, "strictne",   "!==",        1,  2,  1, 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,
+     * an opcode that always throws.
+     */ \
+    macro(JSOP_SETCALL,   74, "setcall",    NULL,         1,  0,  0, JOF_BYTE) \
+    \
+    /*
+     * JSOP_ITER sets up a for-in or for-each-in loop using the JSITER_* flag bits
+     * in this op's uint8_t immediate operand. It replaces the top of stack value
+     * with an iterator for that value.
+     *
+     * JSOP_MOREITER stores the next iterated value into cx->iterValue and pushes
+     * true if another value is available, and false otherwise. It is followed
+     * immediately by JSOP_IFNE.
+     *
+     * JSOP_ENDITER cleans up after the loop. It uses the slot above the iterator
+     * for temporary GC rooting.
+     */ \
+    macro(JSOP_ITER,      75, "iter",       NULL,         2,  1,  1,  JOF_UINT8) \
+    macro(JSOP_MOREITER,  76, "moreiter",   NULL,         1,  1,  2,  JOF_BYTE) \
+    macro(JSOP_ITERNEXT,  77, "iternext",   "<next>",     1,  0,  1,  JOF_BYTE) \
+    macro(JSOP_ENDITER,   78, "enditer",    NULL,         1,  1,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_FUNAPPLY,  79, "funapply",   NULL,         3, -1,  1,  JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \
+    \
+    /* Push object initializer literal. */ \
+    macro(JSOP_OBJECT,    80, "object",     NULL,         5,  0,  1,  JOF_OBJECT) \
+    \
+    /* Pop value and discard it. */ \
+    macro(JSOP_POP,       81, "pop",        NULL,         1,  1,  0,  JOF_BYTE) \
+    \
+    /* Call a function as a constructor; operand is argc. */ \
+    macro(JSOP_NEW,       82, js_new_str,   NULL,         3, -1,  1,  JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \
+    \
+    macro(JSOP_SPREAD,    83, "spread",     NULL,         1,  3,  2,  JOF_BYTE|JOF_ELEM|JOF_SET) \
+    \
+    /* Fast get/set ops for function arguments and local variables. */ \
+    macro(JSOP_GETARG,    84, "getarg",     NULL,         3,  0,  1,  JOF_QARG |JOF_NAME) \
+    macro(JSOP_SETARG,    85, "setarg",     NULL,         3,  1,  1,  JOF_QARG |JOF_NAME|JOF_SET) \
+    macro(JSOP_GETLOCAL,  86,"getlocal",    NULL,         4,  0,  1,  JOF_LOCAL|JOF_NAME) \
+    macro(JSOP_SETLOCAL,  87,"setlocal",    NULL,         4,  1,  1,  JOF_LOCAL|JOF_NAME|JOF_SET|JOF_DETECTING) \
+    \
+    /* Push unsigned 16-bit int constant. */ \
+    macro(JSOP_UINT16,    88, "uint16",     NULL,         3,  0,  1,  JOF_UINT16) \
+    \
+    /*
+     * Object and array literal support.  NEWINIT takes the kind of initializer
+     * (JSProto_Array or JSProto_Object).  NEWARRAY is an array initializer
+     * taking the final length, which can be filled in at the start and initialized
+     * directly.  NEWOBJECT is an object initializer taking an object with the final
+     * shape, which can be set at the start and slots then filled in directly.
+     * NEWINIT has an extra byte so it can be exchanged with NEWOBJECT during emit.
+     */ \
+    macro(JSOP_NEWINIT,   89, "newinit",    NULL,         5,  0,  1, JOF_UINT8) \
+    macro(JSOP_NEWARRAY,  90, "newarray",   NULL,         4,  0,  1, JOF_UINT24) \
+    macro(JSOP_NEWOBJECT, 91, "newobject",  NULL,         5,  0,  1, JOF_OBJECT) \
+    macro(JSOP_ENDINIT,   92, "endinit",    NULL,         1,  0,  0, JOF_BYTE) \
+    macro(JSOP_INITPROP,  93, "initprop",   NULL,         5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \
+    \
+    /* Initialize a numeric property in an object literal, like {1: x}. */ \
+    macro(JSOP_INITELEM,  94, "initelem",   NULL,         1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \
+    \
+    /* Used in array literals with spread. */ \
+    macro(JSOP_INITELEM_INC,95, "initelem_inc", NULL,     1,  3,  2, JOF_BYTE|JOF_ELEM|JOF_SET) \
+    \
+    /* Initialize an array element. */ \
+    macro(JSOP_INITELEM_ARRAY,96, "initelem_array", NULL, 4,  2,  1,  JOF_UINT24|JOF_ELEM|JOF_SET|JOF_DETECTING) \
+    \
+    /*
+     * Initialize a getter/setter in an object literal. The INITELEM* ops are used
+     * for numeric properties like {get 2() {}}.
+     */ \
+    macro(JSOP_INITPROP_GETTER,  97, "initprop_getter",   NULL, 5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \
+    macro(JSOP_INITPROP_SETTER,  98, "initprop_setter",   NULL, 5,  2,  1, JOF_ATOM|JOF_PROP|JOF_SET|JOF_DETECTING) \
+    macro(JSOP_INITELEM_GETTER,  99, "initelem_getter",   NULL, 1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \
+    macro(JSOP_INITELEM_SETTER, 100, "initelem_setter",   NULL, 1,  3,  1, JOF_BYTE|JOF_ELEM|JOF_SET|JOF_DETECTING) \
+    \
+    macro(JSOP_UNUSED101,  101, "unused101",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED102,  102, "unused102",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED103,  103, "unused103",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED104,  104, "unused104",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED105,  105, "unused105",   NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* The argument is the offset to the next statement and is used by IonMonkey. */ \
+    macro(JSOP_LABEL,     106,"label",     NULL,          5,  0,  0,  JOF_JUMP) \
+    \
+    macro(JSOP_UNUSED107, 107,"unused107",  NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* Like JSOP_FUNAPPLY but for f.call instead of f.apply. */ \
+    macro(JSOP_FUNCALL,   108,"funcall",    NULL,         3, -1,  1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \
+    \
+    /* This opcode is the target of the backwards jump for some loop. */ \
+    macro(JSOP_LOOPHEAD,  109,"loophead",   NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* ECMA-compliant assignment ops. */ \
+    macro(JSOP_BINDNAME,  110,"bindname",   NULL,         5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_SET) \
+    macro(JSOP_SETNAME,   111,"setname",    NULL,         5,  2,  1,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING) \
+    \
+    /* Exception handling ops. */ \
+    macro(JSOP_THROW,     112,js_throw_str, NULL,         1,  1,  0,  JOF_BYTE) \
+    \
+    /* 'in' and 'instanceof' ops. */ \
+    macro(JSOP_IN,        113,js_in_str,    js_in_str,    1,  2,  1, JOF_BYTE|JOF_LEFTASSOC) \
+    macro(JSOP_INSTANCEOF,114,js_instanceof_str,js_instanceof_str,1,2,1,JOF_BYTE|JOF_LEFTASSOC|JOF_TMPSLOT) \
+    \
+    /* debugger op */ \
+    macro(JSOP_DEBUGGER,  115,"debugger",   NULL,         1,  0,  0, JOF_BYTE) \
+    \
+    /* gosub/retsub for finally handling */ \
+    macro(JSOP_GOSUB,     116,"gosub",      NULL,         5,  0,  0,  JOF_JUMP) \
+    macro(JSOP_RETSUB,    117,"retsub",     NULL,         1,  2,  0,  JOF_BYTE) \
+    \
+    /* More exception handling ops. */ \
+    macro(JSOP_EXCEPTION, 118,"exception",  NULL,         1,  0,  1,  JOF_BYTE) \
+    \
+    /* Embedded lineno to speedup pc->line mapping. */ \
+    macro(JSOP_LINENO,    119,"lineno",     NULL,         3,  0,  0,  JOF_UINT16) \
+    \
+    /*
+     * ECMA-compliant switch statement ops.
+     * CONDSWITCH is a decompilable NOP; CASE is ===, POP, jump if true, re-push
+     * lval if false; and DEFAULT is POP lval and GOTO.
+     */ \
+    macro(JSOP_CONDSWITCH,120,"condswitch", NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_CASE,      121,"case",       NULL,         5,  2,  1,  JOF_JUMP) \
+    macro(JSOP_DEFAULT,   122,"default",    NULL,         5,  1,  0,  JOF_JUMP) \
+    \
+    /*
+     * ECMA-compliant call to eval op
+     */ \
+    macro(JSOP_EVAL,      123,"eval",       NULL,         3, -1,  1, JOF_UINT16|JOF_INVOKE|JOF_TYPESET) \
+    \
+    macro(JSOP_UNUSED124,  124, "unused124", NULL,      1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED125,  125, "unused125", NULL,      1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED126,  126, "unused126", NULL,      1,  0,  0,  JOF_BYTE) \
+    \
+    /* Prolog bytecodes for defining function, var, and const names. */ \
+    macro(JSOP_DEFFUN,    127,"deffun",     NULL,         5,  0,  0,  JOF_OBJECT) \
+    macro(JSOP_DEFCONST,  128,"defconst",   NULL,         5,  0,  0,  JOF_ATOM) \
+    macro(JSOP_DEFVAR,    129,"defvar",     NULL,         5,  0,  0,  JOF_ATOM) \
+    \
+    /* Push a closure for a named or anonymous function expression. */ \
+    macro(JSOP_LAMBDA,    130, "lambda",    NULL,         5,  0,  1, JOF_OBJECT) \
+    \
+    /* Used for named function expression self-naming, if lightweight. */ \
+    macro(JSOP_CALLEE,    131, "callee",    NULL,         1,  0,  1, JOF_BYTE) \
+    \
+    macro(JSOP_UNUSED132, 132, "unused132", NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* Pick an element from the stack. */ \
+    macro(JSOP_PICK,        133, "pick",      NULL,       2,  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.
+     */ \
+    macro(JSOP_TRY,         134,"try",        NULL,       1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_FINALLY,     135,"finally",    NULL,       1,  0,  2,  JOF_BYTE) \
+    \
+    /*
+     * An "aliased variable" is a var, let, or formal arg that is aliased. Sources
+     * of aliasing include: nested functions accessing the vars of an enclosing
+     * function, function statements that are conditionally executed, 'eval',
+     * 'with', and 'arguments'. All of these cases require creating a CallObject to
+     * own the aliased variable.
+     *
+     * An ALIASEDVAR opcode contains the following immediates:
+     *  uint8 hops:  the number of scope objects to skip to find the ScopeObject
+     *               containing the variable being accessed
+     *  uint24 slot: the slot containing the variable in the ScopeObject (this
+     *               'slot' does not include RESERVED_SLOTS).
+     */ \
+    macro(JSOP_GETALIASEDVAR, 136,"getaliasedvar",NULL,   5,  0,  1, JOF_SCOPECOORD|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_CALLALIASEDVAR,137,"callaliasedvar",NULL,  5,  0,  1, JOF_SCOPECOORD|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_SETALIASEDVAR, 138,"setaliasedvar",NULL,   5,  1,  1, JOF_SCOPECOORD|JOF_NAME|JOF_SET|JOF_DETECTING) \
+    \
+    macro(JSOP_UNUSED139,  139, "unused139",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED140,  140, "unused140",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED141,  141, "unused141",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED142,  142, "unused142",   NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /*
+     * Intrinsic names are emitted instead of JSOP_*NAME ops when the
+     * CompileOptions flag "selfHostingMode" is set.
+     *
+     * They are used in self-hosted code to access other self-hosted values and
+     * intrinsic functions the runtime doesn't give client JS code access to.
+     */ \
+    macro(JSOP_GETINTRINSIC,  143, "getintrinsic",  NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_CALLINTRINSIC, 144, "callintrinsic", NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET) \
+    macro(JSOP_SETINTRINSIC,  145, "setintrinsic",  NULL, 5,  2,  1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING) \
+    macro(JSOP_BINDINTRINSIC, 146, "bindintrinsic", NULL, 5,  0,  1, JOF_ATOM|JOF_NAME|JOF_SET) \
+    \
+    /* Unused. */ \
+    macro(JSOP_UNUSED147,     147,"unused147", NULL,      1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED148,     148,"unused148", NULL,      1,  0,  0,  JOF_BYTE) \
+    \
+    /* Placeholders for a real jump opcode set during backpatch chain fixup. */ \
+    macro(JSOP_BACKPATCH,     149,"backpatch", NULL,      5,  0,  0,  JOF_JUMP) \
+    macro(JSOP_UNUSED150,     150,"unused150", NULL,      1,  0,  0,  JOF_BYTE) \
+    \
+    /* Set pending exception from the stack, to trigger rethrow. */ \
+    macro(JSOP_THROWING,      151,"throwing", NULL,       1,  1,  0,  JOF_BYTE) \
+    \
+    /* Set the return value pseudo-register in stack frame. */ \
+    macro(JSOP_SETRVAL,       152,"setrval",    NULL,       1,  1,  0,  JOF_BYTE) \
+    /*
+     * Stop interpretation and return value set by JSOP_SETRVAL. When not set,
+     * returns UndefinedValue. Also emitted at end of script so interpreter
+     * don't need to check if opcode is still in script range.
+     */ \
+    macro(JSOP_RETRVAL,       153,"retrval",    NULL,       1,  0,  0,  JOF_BYTE) \
+    \
+    /* Free variable references that must either be found on the global or a ReferenceError */ \
+    macro(JSOP_GETGNAME,      154,"getgname",  NULL,       5,  0,  1, JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME) \
+    macro(JSOP_SETGNAME,      155,"setgname",  NULL,       5,  2,  1, JOF_ATOM|JOF_NAME|JOF_SET|JOF_DETECTING|JOF_GNAME) \
+    \
+    macro(JSOP_UNUSED156,  156, "unused156",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED157,  157, "unused157",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED158,  158, "unused158",   NULL,         1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED159,  159, "unused159",   NULL,         1,  0,  0,  JOF_BYTE) \
+    \
+    /* Regular expression literal requiring special "fork on exec" handling. */ \
+    macro(JSOP_REGEXP,        160,"regexp",   NULL,       5,  0,  1, JOF_REGEXP) \
+    \
+    macro(JSOP_UNUSED161,     161,"unused161",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED162,     162,"unused162",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED163,     163,"unused163",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED164,     164,"unused164",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED165,     165,"unused165",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED166,     166,"unused166",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED167,     167,"unused167",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED168,     168,"unused168",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED169,     169,"unused169",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED170,     170,"unused170",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED171,     171,"unused171",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED172,     172,"unused172",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED173,     173,"unused173",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED174,     174,"unused174",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED175,     175,"unused175",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED176,     176,"unused176",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED177,     177,"unused177",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED178,     178,"unused178",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED179,     179,"unused179",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED180,     180,"unused180",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED181,     181,"unused181",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED182,     182,"unused182",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED183,     183,"unused183",  NULL,     1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_CALLPROP,      184,"callprop",   NULL,     5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \
+    \
+    macro(JSOP_UNUSED185,     185,"unused185",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED186,     186,"unused186",  NULL,     1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED187,     187,"unused187",  NULL,     1,  0,  0,  JOF_BYTE) \
+    \
+    /* Opcode to hold 24-bit immediate integer operands. */ \
+    macro(JSOP_UINT24,        188,"uint24",     NULL,     4,  0,  1, JOF_UINT24) \
+    \
+    macro(JSOP_UNUSED189,     189,"unused189",   NULL,    1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED190,     190,"unused190",   NULL,    1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED191,     191,"unused191",   NULL,    1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED192,     192,"unused192",   NULL,    1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_CALLELEM,      193, "callelem",   NULL,    1,  2,  1, JOF_BYTE |JOF_ELEM|JOF_TYPESET|JOF_LEFTASSOC) \
+    \
+    /* __proto__: v inside an object initializer. */ \
+    macro(JSOP_MUTATEPROTO,   194, "mutateproto",NULL,    1,  2,  1, JOF_BYTE) \
+    \
+    /*
+     * Get an extant property value, throwing ReferenceError if the identified
+     * property does not exist.
+     */ \
+    macro(JSOP_GETXPROP,      195,"getxprop",    NULL,    5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET) \
+    \
+    macro(JSOP_UNUSED196,     196,"unused196",   NULL,    1,  0,  0, JOF_BYTE) \
+    \
+    /* Specialized JSOP_TYPEOF to avoid reporting undefined for typeof(0, undef). */ \
+    macro(JSOP_TYPEOFEXPR,    197,"typeofexpr",  NULL,    1,  1,  1, JOF_BYTE|JOF_DETECTING) \
+    \
+    /* Block-local scope support. */ \
+    macro(JSOP_PUSHBLOCKSCOPE,198,"pushblockscope", NULL, 5,  0,  0,  JOF_OBJECT) \
+    macro(JSOP_POPBLOCKSCOPE, 199,"popblockscope", NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_DEBUGLEAVEBLOCK, 200,"debugleaveblock", NULL, 1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_UNUSED201,     201,"unused201",  NULL,     1,  0,  0,  JOF_BYTE) \
+    \
+    /* Generator and array comprehension support. */ \
+    macro(JSOP_GENERATOR,     202,"generator",   NULL,    1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_YIELD,         203,"yield",       NULL,    1,  1,  1,  JOF_BYTE) \
+    macro(JSOP_ARRAYPUSH,     204,"arraypush",   NULL,    1,  2,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_UNUSED205,     205, "unused205",    NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED206,     206, "unused206",    NULL,  1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_UNUSED207,     207, "unused207",    NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED208,     208, "unused208",    NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED209,     209, "unused209",    NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED210,     210, "unused210",    NULL,  1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_CALLGNAME,     211, "callgname",    NULL,  5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_TYPESET|JOF_GNAME) \
+    macro(JSOP_CALLLOCAL,     212, "calllocal",    NULL,  4,  0,  1,  JOF_LOCAL|JOF_NAME) \
+    macro(JSOP_CALLARG,       213, "callarg",      NULL,  3,  0,  1,  JOF_QARG |JOF_NAME) \
+    macro(JSOP_BINDGNAME,     214, "bindgname",    NULL,  5,  0,  1,  JOF_ATOM|JOF_NAME|JOF_SET|JOF_GNAME) \
+    \
+    /* Opcodes to hold 8-bit and 32-bit immediate integer operands. */ \
+    macro(JSOP_INT8,          215, "int8",         NULL,  2,  0,  1, JOF_INT8) \
+    macro(JSOP_INT32,         216, "int32",        NULL,  5,  0,  1, JOF_INT32) \
+    \
+    /* Get the value of the 'length' property from a stacked value. */ \
+    macro(JSOP_LENGTH,        217, "length",       NULL,  5,  1,  1, JOF_ATOM|JOF_PROP|JOF_TYPESET|JOF_TMPSLOT3) \
+    \
+    /*
+     * 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.
+     */ \
+    macro(JSOP_HOLE,          218, "hole",         NULL,  1,  0,  1,  JOF_BYTE) \
+    \
+    macro(JSOP_UNUSED219,     219,"unused219",     NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED220,     220,"unused220",     NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED221,     221,"unused221",     NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED222,     222,"unused222",     NULL,  1,  0,  0,  JOF_BYTE) \
+    macro(JSOP_UNUSED223,     223,"unused223",     NULL,  1,  0,  0,  JOF_BYTE) \
+    \
+    macro(JSOP_REST,          224, "rest",         NULL,  1,  0,  1,  JOF_BYTE|JOF_TYPESET) \
+    \
+    /* Pop the stack, convert to a jsid (int or string), and push back. */ \
+    macro(JSOP_TOID,          225, "toid",         NULL,  1,  1,  1,  JOF_BYTE) \
+    \
+    /* Push the implicit 'this' value for calls to the associated name. */ \
+    macro(JSOP_IMPLICITTHIS,  226, "implicitthis", "",    5,  0,  1,  JOF_ATOM) \
+    \
+    /*
+     * This opcode is the target of the entry jump for some loop. The uint8 argument
+     * is the loop depth. This value starts at 1 and is just a hint: deeply
+     * nested loops all have the same value.
+     */ \
+    macro(JSOP_LOOPENTRY,     227, "loopentry",    NULL,  2,  0,  0,  JOF_UINT8)
+
+/*
+ * In certain circumstances it may be useful to "pad out" the opcode space to
+ * a power of two.  Use this macro to do so.
+ */
+#define FOR_EACH_TRAILING_UNUSED_OPCODE(macro) \
+    macro(228) \
+    macro(229) \
+    macro(230) \
+    macro(231) \
+    macro(232) \
+    macro(233) \
+    macro(234) \
+    macro(235) \
+    macro(236) \
+    macro(237) \
+    macro(238) \
+    macro(239) \
+    macro(240) \
+    macro(241) \
+    macro(242) \
+    macro(243) \
+    macro(244) \
+    macro(245) \
+    macro(246) \
+    macro(247) \
+    macro(248) \
+    macro(249) \
+    macro(250) \
+    macro(251) \
+    macro(252) \
+    macro(253) \
+    macro(254) \
+    macro(255)
+
+namespace js {
+
+// Sanity check that opcode values and trailing unused opcodes completely cover
+// the [0, 256) range.  Avert your eyes!  You don't want to know how the
+// sausage gets made.
+
+#define VALUE_AND_VALUE_PLUS_ONE(op, val, ...) \
+    val) && (val + 1 ==
+#define TRAILING_VALUE_AND_VALUE_PLUS_ONE(val) \
+    val) && (val + 1 ==
+static_assert((0 ==
+               FOR_EACH_OPCODE(VALUE_AND_VALUE_PLUS_ONE)
+               FOR_EACH_TRAILING_UNUSED_OPCODE(TRAILING_VALUE_AND_VALUE_PLUS_ONE)
+               256),
+              "opcode values and trailing unused opcode values monotonically "
+              "increase from zero to 255");
+#undef TRAILING_VALUE_AND_VALUE_PLUS_ONE
+#undef VALUE_AND_VALUE_PLUS_ONE
+
+// Define JSOP_*_LENGTH constants for all ops.
+#define DEFINE_LENGTH_CONSTANT(op, val, name, image, len, ...) \
+    MOZ_CONSTEXPR_VAR size_t op##_LENGTH = len;
+FOR_EACH_OPCODE(DEFINE_LENGTH_CONSTANT)
+#undef DEFINE_LENGTH_CONSTANT
+
+} // namespace js
+
+#endif // vm_Opcodes_h
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -3,24 +3,24 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/Stack-inl.h"
 
 #include "mozilla/PodOperations.h"
 
-#include "jsautooplen.h"
 #include "jscntxt.h"
 
 #include "gc/Marking.h"
 #ifdef JS_ION
 #include "jit/BaselineFrame.h"
 #include "jit/JitCompartment.h"
 #endif
+#include "vm/Opcodes.h"
 
 #include "jit/IonFrameIterator-inl.h"
 #include "vm/Interpreter-inl.h"
 #include "vm/Probes-inl.h"
 #include "vm/ScopeObject-inl.h"
 
 using namespace js;