Bytecode Listing
This document is automatically generated from Opcodes.h by make_opcode_doc.py.
Statements
Jumps
- JSOP_AND [-1, +1] (JUMP, DETECTING, LEFTASSOC)
- 
 Value 69 (0x45)Operands int32_t offsetLength 5Stack Uses condStack Defs condConverts the top of stack value into a boolean, if the result is false, jumps to a 32-bit offset from the current bytecode.
- JSOP_GOTO [-0, +0] (JUMP)
- 
 Value 6 (0x06)Operands int32_t offsetLength 5Stack Uses Stack Defs Jumps to a 32-bit offset from the current bytecode. 
- JSOP_IFEQ [-1, +0] (JUMP, DETECTING)
- 
 Value 7 (0x07)Operands int32_t offsetLength 5Stack Uses condStack Defs Pops the top of stack value, converts it into a boolean, if the result is false, jumps to a 32-bit offset from the current bytecode.The idea is that a sequence like JSOP_ZERO;JSOP_ZERO;JSOP_EQ;JSOP_IFEQ;JSOP_RETURN; reads like a nice linear sequence that will execute the return.
- JSOP_IFNE [-1, +0] (JUMP)
- 
 Value 8 (0x08)Operands int32_t offsetLength 5Stack Uses condStack Defs Pops the top of stack value, converts it into a boolean, if the result is true, jumps to a 32-bit offset from the current bytecode.
- JSOP_LABEL [-0, +0] (JUMP)
- 
 Value 106 (0x6a)Operands int32_t offsetLength 5Stack Uses Stack Defs This opcode precedes every labeled statement. It's a no-op. offsetis the offset to the next instruction after this statement, the onebreak LABEL;would jump to. IonMonkey uses this.
- JSOP_LOOPENTRY [-0, +0] (UINT8)
- 
 Value 227 (0xe3)Operands uint8_t BITFIELDLength 2Stack Uses Stack Defs This opcode is the target of the entry jump for some loop. The uint8 argument is a bitfield. The lower 7 bits of the argument indicate the loop depth. This value starts at 1 and is just a hint: deeply nested loops all have the same value. The upper bit is set if Ion should be able to OSR at this point, which is true unless there is non-loop state on the stack. 
- JSOP_LOOPHEAD [-0, +0]
- 
 Value 109 (0x6d)Operands Length 1Stack Uses Stack Defs Another no-op. This opcode is the target of the backwards jump for some loop. 
- JSOP_OR [-1, +1] (JUMP, DETECTING, LEFTASSOC)
- 
 Value 68 (0x44)Operands int32_t offsetLength 5Stack Uses condStack Defs condConverts the top of stack value into a boolean, if the result is true, jumps to a 32-bit offset from the current bytecode.
Switch Statement
- JSOP_CASE [-2, +1] (JUMP)
- 
 Value 121 (0x79)Operands int32_t offsetLength 5Stack Uses lval, rvalStack Defs lval(if lval !== rval)Pops the top two values on the stack as rvalandlval, compare them with===, if the result istrue, jumps to a 32-bit offset from the current bytecode, re-pusheslvalonto the stack iffalse.
- JSOP_CONDSWITCH [-0, +0]
- 
 Value 120 (0x78)Operands Length 1Stack Uses Stack Defs This no-op appears after the bytecode for EXPR in switch (EXPR) {...}if the switch cannot be optimized usingJSOP_TABLESWITCH. For a non-optimized switch statement like this:switch (EXPR) { case V0: C0; ... default: D; }the bytecode looks like this: (EXPR) condswitch (V0) case ->C0 ... default ->D (C0) ... (D) Note that code for all case-labels is emitted first, then code for the body of each case clause. 
- JSOP_DEFAULT [-1, +0] (JUMP)
- 
 Value 122 (0x7a)Operands int32_t offsetLength 5Stack Uses lvalStack Defs This appears after all cases in a JSOP_CONDSWITCH, whether there is adefault:label in the switch statement or not. Pop the switch operand from the stack and jump to a 32-bit offset from the current bytecode. offset from the current bytecode.
- JSOP_TABLESWITCH [-1, +0] (TABLESWITCH, DETECTING)
- 
 Value 70 (0x46)Operands int32_t len, int32_t low, int32_t high,int32_t offset[0], ..., int32_t offset[high-low]Length lenStack Uses iStack Defs Pops the top of stack value as i, iflow <= i <= high, jumps to a 32-bit offset:offset[i - low]from the current bytecode, jumps to a 32-bit offset:lenfrom the current bytecode if not.This opcode has variable length. 
For-In Statement
- JSOP_ENDITER [-1, +0]
- 
 Value 78 (0x4e)Operands Length 1Stack Uses iterStack Defs Exits a for-in loop by popping the iterator object from the stack and closing it. 
- JSOP_ISGENCLOSING [-1, +2]
- 
 Value 187 (0xbb)Operands Length 1Stack Uses valStack Defs val, resPushes a boolean indicating whether the top of the stack is MagicValue( JS_GENERATOR_CLOSING).
- JSOP_ISNOITER [-1, +2]
- 
 Value 77 (0x4d)Operands Length 1Stack Uses valStack Defs val, resPushes a boolean indicating whether the value on top of the stack is MagicValue( JS_NO_ITER_VALUE).
- JSOP_ITER [-1, +1] (UINT8)
- 
 Value 75 (0x4b)Operands uint8_t flagsLength 2Stack Uses valStack Defs iterSets up a for-in or for-each-in loop using the JSITER_*flag bits in this op's uint8_t immediate operand. It pops the top of stack value asvaland pushesiterwhich is an iterator forval.
- JSOP_MOREITER [-1, +2]
- 
 Value 76 (0x4c)Operands Length 1Stack Uses iterStack Defs iter, valPushes the next iterated value onto the stack. If no value is available, MagicValue( JS_NO_ITER_VALUE) is pushed.
With Statement
- JSOP_ENTERWITH [-1, +0] (SCOPE)
- 
 Value 3 (0x03)Operands uint32_t staticWithIndexLength 5Stack Uses valStack Defs Pops the top of stack value, converts it to an object, and adds a WithEnvironmentObjectwrapping that object to the environment chain.There is a matching JSOP_LEAVEWITHinstruction later. All name lookups between the two that may need to consult the With object are deoptimized.
- JSOP_LEAVEWITH [-0, +0]
- 
 Value 4 (0x04)Operands Length 1Stack Uses Stack Defs Pops the environment chain object pushed by JSOP_ENTERWITH.
Exception Handling
- JSOP_EXCEPTION [-0, +1]
- 
 Value 118 (0x76)Operands Length 1Stack Uses Stack Defs exceptionPushes the current pending exception onto the stack and clears the pending exception. This is only emitted at the beginning of code for a catch-block, so it is known that an exception is pending. It is used to implement catch-blocks and yield*.
- JSOP_FINALLY [-0, +2]
- 
 Value 135 (0x87)Operands Length 1Stack Uses Stack Defs false, (next bytecode's PC)This opcode has a def count of 2, but these values are already on the stack (they're pushed by JSOP_GOSUB).
- JSOP_GOSUB [-0, +0] (JUMP)
- 
 Value 116 (0x74)Operands int32_t offsetLength 5Stack Uses Stack Defs Pushes falseand next bytecode's PC onto the stack, and jumps to a 32-bit offset from the current bytecode.This opcode is used for entering finallyblock. When the execution resumes fromfinallyblock, those stack values are popped.
- JSOP_RETSUB [-2, +0]
- 
 Value 117 (0x75)Operands Length 1Stack Uses lval, rvalStack Defs Pops the top two values on the stack as rvalandlval, convertslvalinto a boolean, raises error if the result istrue, jumps to a 32-bit absolute PC:rvaliffalse.This opcode is used for returning from finallyblock.
- JSOP_THROW [-1, +0]
- 
 Value 112 (0x70)Operands Length 1Stack Uses vStack Defs Pops the top of stack value as v, sets pending exception asv, then raises error.
- JSOP_THROWING [-1, +0]
- 
 Value 151 (0x97)Operands Length 1Stack Uses vStack Defs Pops the top of stack value as v, sets pending exception asv, to trigger rethrow.This opcode is used in conditional catch clauses. 
- JSOP_THROWMSG [-0, +0] (UINT16)
- 
 Value 74 (0x4a)Operands uint16_t msgNumberLength 3Stack Uses Stack Defs Sometimes we know when emitting that an operation will always throw. Throws the indicated JSMSG.
- JSOP_TRY [-0, +0]
- 
 Value 134 (0x86)Operands Length 1Stack Uses Stack Defs This no-op appears at the top of the bytecode for a TryStatement.Location information for catch/finally blocks is stored in a side table, script->trynotes().
Function
- JSOP_CALL [-(argc+2), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 58 (0x3a)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalInvokes calleewiththisandargs, pushes return value onto the stack.
- JSOP_CALLITER [-2, +1] (UINT16, INVOKE, TYPESET)
- 
 Value 145 (0x91)Operands uint16_t argc (must be 0)Length 3Stack Uses callee, thisStack Defs rvalLike JSOP_CALL, but used as part of for-of and destructuring bytecode to provide better error messages.
- JSOP_CALL_IGNORES_RV [-(argc+2), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 231 (0xe7)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalLike JSOP_CALL, but tells the function that the return value is ignored. stack.
- JSOP_CHECKISCALLABLE [-1, +1] (UINT8)
- 
 Value 219 (0xdb)Operands uint8_t kindLength 2Stack Uses objStack Defs objChecks that the top value on the stack is callable, and throws a TypeError if not. The operand kindis used only to generate an appropriate error message.
- JSOP_EVAL [-(argc+2), +1] (UINT16, INVOKE, TYPESET, CHECKSLOPPY)
- 
 Value 123 (0x7b)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalInvokes evalwithargsand pushes return value onto the stack.If evalin global scope is not original one, invokes the function withthisandargs, and pushes return value onto the stack.
- JSOP_FUNAPPLY [-(argc+2), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 79 (0x4f)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalInvokes calleewiththisandargs, pushes return value onto the stack.This is for f.apply.
- JSOP_FUNCALL [-(argc+2), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 108 (0x6c)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalInvokes calleewiththisandargs, pushes return value onto the stack.If calleeis determined to be the canonicalFunction.prototype.callfunction, then this operation is optimized to directly callcalleewithargs[0]asthis, and the remaining arguments as formal args tocallee.Like JSOP_FUNAPPLYbut forf.callinstead off.apply.
- JSOP_FUNWITHPROTO [-1, +1] (OBJECT)
- 
 Value 52 (0x34)Operands uint32_t funcIndexLength 5Stack Uses protoStack Defs objPushes a clone of a function with a given [[Prototype]] onto the stack. 
- JSOP_GETRVAL [-0, +1]
- 
 Value 2 (0x02)Operands Length 1Stack Uses Stack Defs rvalPushes stack frame's rvalonto the stack.
- JSOP_LAMBDA [-0, +1] (OBJECT)
- 
 Value 130 (0x82)Operands uint32_t funcIndexLength 5Stack Uses Stack Defs objPushes a closure for a named or anonymous function expression onto the stack. 
- JSOP_LAMBDA_ARROW [-1, +1] (OBJECT)
- 
 Value 131 (0x83)Operands uint32_t funcIndexLength 5Stack Uses new.targetStack Defs objPops the top of stack value as new.target, pushes an arrow function with lexicalnew.targetonto the stack.
- JSOP_NEW [-(argc+3), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 82 (0x52)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1], newTargetStack Defs rvalInvokes calleeas a constructor withthisandargs, pushes return value onto the stack.
- JSOP_OPTIMIZE_SPREADCALL [-1, +2]
- 
 Value 178 (0xb2)Operands Length 1Stack Uses arrStack Defs arr, optimizedPops the top stack value, pushes the value and a boolean value that indicates whether the spread operation for the value can be optimized in spread call. 
- JSOP_RETRVAL [-0, +0]
- 
 Value 153 (0x99)Operands Length 1Stack Uses Stack Defs Stops interpretation and returns value set by JSOP_SETRVAL. When not set, returnsundefined.Also emitted at end of script so interpreter don't need to check if opcode is still in script range. 
- JSOP_RETURN [-1, +0]
- 
 Value 5 (0x05)Operands Length 1Stack Uses rvalStack Defs Pops the top of stack value as rval, stops interpretation of current script and returnsrval.
- JSOP_RUNONCE [-0, +0]
- 
 Value 71 (0x47)Operands Length 1Stack Uses Stack Defs Prologue emitted in scripts expected to run once, which deoptimizes code if it executes multiple times. 
- JSOP_SETFUNNAME [-2, +1] (UINT8)
- 
 Value 182 (0xb6)Operands uint8_t prefixKindLength 2Stack Uses fun, nameStack Defs funPops the top two values on the stack as nameandfun, defines the name offuntonamewith prefix if any, and pushesfunback onto the stack.
- JSOP_SETRVAL [-1, +0]
- 
 Value 152 (0x98)Operands Length 1Stack Uses rvalStack Defs Pops the top of stack value as rval, sets the return value in stack frame asrval.
- JSOP_SPREADCALL [-3, +1] (INVOKE, TYPESET)
- 
 Value 41 (0x29)Operands Length 1Stack Uses callee, this, argsStack Defs rvalspreadcall variant of JSOP_CALL.Invokes calleewiththisandargs, pushes the return value onto the stack.argsis an Array object which contains actual arguments.
- JSOP_SPREADEVAL [-3, +1] (INVOKE, TYPESET, CHECKSLOPPY)
- 
 Value 43 (0x2b)Operands Length 1Stack Uses callee, this, argsStack Defs rvalspreadcall variant of JSOP_EVALInvokes evalwithargsand pushes the return value onto the stack.If evalin global scope is not original one, invokes the function withthisandargs, and pushes return value onto the stack.
- JSOP_SPREADNEW [-4, +1] (INVOKE, TYPESET)
- 
 Value 42 (0x2a)Operands Length 1Stack Uses callee, this, args, newTargetStack Defs rvalspreadcall variant of JSOP_NEWInvokes calleeas a constructor withthisandargs, pushes the return value onto the stack.
- JSOP_SPREADSUPERCALL [-4, +1] (INVOKE, TYPESET)
- 
 Value 166 (0xa6)Operands Length 1Stack Uses callee, this, args, newTargetStack Defs rvalspreadcall variant of JSOP_SUPERCALL.Behaves exactly like JSOP_SPREADNEW.
- JSOP_STRICTEVAL [-(argc+2), +1] (UINT16, INVOKE, TYPESET, CHECKSTRICT)
- 
 Value 124 (0x7c)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1]Stack Defs rvalInvokes evalwithargsand pushes return value onto the stack.If evalin global scope is not original one, invokes the function withthisandargs, and pushes return value onto the stack.
- JSOP_STRICTSPREADEVAL [-3, +1] (INVOKE, TYPESET, CHECKSTRICT)
- 
 Value 50 (0x32)Operands Length 1Stack Uses callee, this, argsStack Defs rvalspreadcall variant of JSOP_EVALInvokes evalwithargsand pushes the return value onto the stack.If evalin global scope is not original one, invokes the function withthisandargs, and pushes return value onto the stack.
- JSOP_SUPERCALL [-(argc+3), +1] (UINT16, INVOKE, TYPESET)
- 
 Value 165 (0xa5)Operands uint16_t argcLength 3Stack Uses callee, this, args[0], ..., args[argc-1], newTargetStack Defs rvalBehaves exactly like JSOP_NEW, but allows JITs to distinguish the two cases.
- JSOP_TOASYNC [-1, +1]
- 
 Value 149 (0x95)Operands Length 1Stack Uses unwrappedStack Defs wrappedPops the top of stack value as unwrapped, converts it to async functionwrapped, and pusheswrappedback on the stack.
Generator
- JSOP_AWAIT [-2, +1] (UINT24)
- 
 Value 209 (0xd1)Operands uint24_t yieldAndAwaitIndexLength 4Stack Uses promise, genStack Defs resolvedPops the generator and the return value promise, stops interpretation and returnspromise. Pushes resolved value onto the stack.
- JSOP_CHECKISOBJ [-1, +1] (UINT8)
- 
 Value 14 (0x0e)Operands uint8_t kindLength 2Stack Uses resultStack Defs resultChecks that the top value on the stack is an object, and throws a TypeError if not. The operand kindis used only to generate an appropriate error message.
- JSOP_FINALYIELDRVAL [-1, +0]
- 
 Value 204 (0xcc)Operands Length 1Stack Uses genStack Defs Pops the generator and suspends and closes it. Yields the value in the frame's return value slot. 
- JSOP_GENERATOR [-0, +1]
- 
 Value 212 (0xd4)Operands Length 1Stack Uses Stack Defs generatorInitializes generator frame, creates a generator and pushes it on the stack. 
- JSOP_INITIALYIELD [-1, +1] (UINT24)
- 
 Value 202 (0xca)Operands uint24_t yieldAndAwaitIndexLength 4Stack Uses generatorStack Defs generatorPops the generator from the top of the stack, suspends it and stops interpretation. 
- JSOP_RESUME [-2, +1] (UINT8, INVOKE)
- 
 Value 205 (0xcd)Operands resume kind (GeneratorObject::ResumeKind)Length 3Stack Uses gen, valStack Defs rvalPops the generator and argument from the stack, pushes a new generator frame and resumes execution of it. Pushes the return value after the generator yields. 
- JSOP_YIELD [-2, +1] (UINT24)
- 
 Value 203 (0xcb)Operands uint24_t yieldAndAwaitIndexLength 4Stack Uses rval1, genStack Defs rval2Pops the generator and the return value rval1, stops interpretation and returnsrval1. Pushes sent value fromsend()onto the stack.
Debugger
- JSOP_DEBUGGER [-0, +0]
- 
 Value 115 (0x73)Operands Length 1Stack Uses Stack Defs Invokes debugger. 
- JSOP_DEBUGLEAVELEXICALENV [-0, +0]
- 
 Value 201 (0xc9)Operands Length 1Stack Uses Stack Defs The opcode to assist the debugger. 
Variables and Scopes
Variables
- JSOP_BINDNAME [-0, +1] (ATOM, NAME)
- 
 Value 110 (0x6e)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs envLooks up name on the environment chain and pushes the environment which contains the name onto the stack. If not found, pushes global lexical environment onto the stack. 
- JSOP_DEFCONST [-0, +0] (ATOM)
- 
 Value 128 (0x80)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs Defines the new constant binding on global lexical environment. Throws if a binding with the same name already exists on the environment, or if a var binding with the same name exists on the global. 
- JSOP_DEFFUN [-1, +0]
- 
 Value 127 (0x7f)Operands Length 1Stack Uses funStack Defs Defines the given function on the current scope. This is used for global scripts and also in some cases for function scripts where use of dynamic scoping inhibits optimization. 
- JSOP_DEFLET [-0, +0] (ATOM)
- 
 Value 162 (0xa2)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs Defines the new mutable binding on global lexical environment. Throws if a binding with the same name already exists on the environment, or if a var binding with the same name exists on the global. 
- JSOP_DEFVAR [-0, +0] (ATOM)
- 
 Value 129 (0x81)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs Defines the new binding on the frame's current variables-object (the environment on the environment chain designated to receive new variables). Throws if the current variables-object is the global object and a binding with the same name exists on the global lexical environment. This is used for global scripts and also in some cases for function scripts where use of dynamic scoping inhibits optimization. 
- JSOP_DELNAME [-0, +1] (ATOM, NAME, CHECKSLOPPY)
- 
 Value 36 (0x24)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs succeededLooks up name on the environment chain and deletes it, pushes trueonto the stack if succeeded (if the property was present and deleted or if the property wasn't present in the first place),falseif not.Strict mode code should never contain this opcode. 
- JSOP_GETIMPORT [-0, +1] (ATOM, NAME, TYPESET)
- 
 Value 176 (0xb0)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs valGets the value of a module import by name and pushes it onto the stack. 
- JSOP_GETNAME [-0, +1] (ATOM, NAME, TYPESET)
- 
 Value 59 (0x3b)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs valLooks up name on the environment chain and pushes its value onto the stack. 
- JSOP_SETNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, CHECKSLOPPY)
- 
 Value 111 (0x6f)Operands uint32_t nameIndexLength 5Stack Uses env, valStack Defs valPops an environment and value from the stack, assigns value to the given name, and pushes the value back on the stack 
- JSOP_STRICTSETNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, CHECKSTRICT)
- 
 Value 49 (0x31)Operands uint32_t nameIndexLength 5Stack Uses env, valStack Defs valPops a environment and value from the stack, assigns value to the given name, and pushes the value back on the stack. If the set failed, then throw a TypeError, per usual strict mode semantics. 
Free Variables
- JSOP_BINDGNAME [-0, +1] (ATOM, NAME, GNAME)
- 
 Value 214 (0xd6)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs globalPushes the global environment onto the stack if the script doesn't have a non-syntactic global scope. Otherwise will act like JSOP_BINDNAME.nameIndexis only used when acting likeJSOP_BINDNAME.
- JSOP_BINDVAR [-0, +1]
- 
 Value 213 (0xd5)Operands Length 1Stack Uses Stack Defs envPushes the nearest varenvironment.
- JSOP_GETGNAME [-0, +1] (ATOM, NAME, TYPESET, GNAME)
- 
 Value 154 (0x9a)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs valLooks up name on global environment and pushes its value onto the stack, unless the script has a non-syntactic global scope, in which case it acts just like JSOP_NAME.Free variable references that must either be found on the global or a ReferenceError. 
- JSOP_INITGLEXICAL [-1, +1] (ATOM, NAME, PROPINIT, GNAME)
- 
 Value 161 (0xa1)Operands uint32_t nameIndexLength 5Stack Uses valStack Defs valInitializes an uninitialized global lexical binding with the top of stack value. 
- JSOP_SETGNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, GNAME, CHECKSLOPPY)
- 
 Value 155 (0x9b)Operands uint32_t nameIndexLength 5Stack Uses env, valStack Defs valPops the top two values on the stack as valandenv, sets property ofenvasvaland pushesvalback on the stack.envshould be the global lexical environment unless the script has a non-syntactic global scope, in which case acts likeJSOP_SETNAME.
- JSOP_STRICTSETGNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, GNAME, CHECKSTRICT)
- 
 Value 156 (0x9c)Operands uint32_t nameIndexLength 5Stack Uses env, valStack Defs valPops the top two values on the stack as valandenv, sets property ofenvasvaland pushesvalback on the stack. Throws a TypeError if the set fails, per strict mode semantics.envshould be the global lexical environment unless the script has a non-syntactic global scope, in which case acts likeJSOP_STRICTSETNAME.
Local Variables
- JSOP_CHECKLEXICAL [-0, +0] (LOCAL, NAME)
- 
 Value 138 (0x8a)Operands uint32_t localnoLength 4Stack Uses Stack Defs Checks if the value of the local variable is the JS_UNINITIALIZED_LEXICALmagic, throwing an error if so.
- JSOP_GETLOCAL [-0, +1] (LOCAL, NAME)
- 
 Value 86 (0x56)Operands uint32_t localnoLength 4Stack Uses Stack Defs valPushes the value of local variable onto the stack. 
- JSOP_INITLEXICAL [-1, +1] (LOCAL, NAME, DETECTING)
- 
 Value 139 (0x8b)Operands uint32_t localnoLength 4Stack Uses vStack Defs vInitializes an uninitialized local lexical binding with the top of stack value. 
- JSOP_SETLOCAL [-1, +1] (LOCAL, NAME, DETECTING)
- 
 Value 87 (0x57)Operands uint32_t localnoLength 4Stack Uses vStack Defs vStores the top stack value to the given local. 
- JSOP_THROWSETCALLEE [-1, +1]
- 
 Value 179 (0xb3)Operands Length 1Stack Uses vStack Defs vThrows a runtime TypeError for invalid assignment to the callee in a named lambda, which is always a constbinding. This is a different bytecode thanJSOP_SETCONSTbecause the named lambda callee, if not closed over, does not have a frame slot to look up the name with for the error message.
- JSOP_THROWSETCONST [-1, +1] (LOCAL, NAME, DETECTING)
- 
 Value 169 (0xa9)Operands uint32_t localnoLength 4Stack Uses vStack Defs vThrows a runtime TypeError for invalid assignment to const. The localno is used for better error messages.
Aliased Variables
- JSOP_CHECKALIASEDLEXICAL [-0, +0] (ENVCOORD, NAME)
- 
 Value 140 (0x8c)Operands uint8_t hops, uint24_t slotLength 5Stack Uses Stack Defs Checks if the value of the aliased variable is the JS_UNINITIALIZED_LEXICALmagic, throwing an error if so.
- JSOP_GETALIASEDVAR [-0, +1] (ENVCOORD, NAME, TYPESET)
- 
 Value 136 (0x88)Operands uint8_t hops, uint24_t slotLength 5Stack Uses Stack Defs aliasedVarPushes aliased variable onto the stack. 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, andarguments. 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 environment objects to skip to find the EnvironmentObject containing the variable being accessed uint24 slot: the slot containing the variable in the EnvironmentObject (this 'slot' does not include RESERVED_SLOTS).
- JSOP_INITALIASEDLEXICAL [-1, +1] (ENVCOORD, NAME, PROPINIT, DETECTING)
- 
 Value 141 (0x8d)Operands uint8_t hops, uint24_t slotLength 5Stack Uses vStack Defs vInitializes an uninitialized aliased lexical binding with the top of stack value. 
- JSOP_SETALIASEDVAR [-1, +1] (ENVCOORD, NAME, PROPSET, DETECTING)
- 
 Value 137 (0x89)Operands uint8_t hops, uint24_t slotLength 5Stack Uses vStack Defs vSets aliased variable as the top of stack value. 
- JSOP_THROWSETALIASEDCONST [-1, +1] (ENVCOORD, NAME, DETECTING)
- 
 Value 170 (0xaa)Operands uint8_t hops, uint24_t slotLength 5Stack Uses vStack Defs vThrows a runtime TypeError for invalid assignment to const. The environment coordinate is used for better error messages.
Intrinsics
- JSOP_GETINTRINSIC [-0, +1] (ATOM, NAME, TYPESET)
- 
 Value 143 (0x8f)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs intrinsic[name]Pushes the value of the intrinsic onto the stack. Intrinsic names are emitted instead of JSOP_*NAMEops when theCompileOptionsflagselfHostingModeis 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. 
- JSOP_SETINTRINSIC [-1, +1] (ATOM, NAME, DETECTING)
- 
 Value 144 (0x90)Operands uint32_t nameIndexLength 5Stack Uses valStack Defs valStores the top stack value in the specified intrinsic. 
Block-local Scope
- JSOP_FRESHENLEXICALENV [-0, +0]
- 
 Value 197 (0xc5)Operands Length 1Stack Uses Stack Defs Replaces the current block on the env chain with a fresh block that copies all the bindings in the bock. This operation implements the behavior of inducing a fresh lexical environment for every iteration of a for(let ...; ...; ...) loop, if any declarations induced by such a loop are captured within the loop. 
- JSOP_POPLEXICALENV [-0, +0]
- 
 Value 200 (0xc8)Operands Length 1Stack Uses Stack Defs Pops lexical environment from the env chain. 
- JSOP_PUSHLEXICALENV [-0, +0] (SCOPE)
- 
 Value 199 (0xc7)Operands uint32_t scopeIndexLength 5Stack Uses Stack Defs Pushes lexical environment onto the env chain. 
- JSOP_RECREATELEXICALENV [-0, +0]
- 
 Value 198 (0xc6)Operands Length 1Stack Uses Stack Defs Recreates the current block on the env chain with a fresh block with uninitialized bindings. This operation implements the behavior of inducing a fresh lexical environment for every iteration of a for-in/of loop whose loop-head has a (captured) lexical declaration. 
This
- JSOP_CHECKRETURN [-1, +0]
- 
 Value 190 (0xbe)Operands Length 1Stack Uses thisStack Defs Check if a derived class constructor has a valid return value and thisvalue before it returns. If the return value is not an object, stores thethisvalue to the return value slot.
- JSOP_CHECKTHIS [-1, +1]
- 
 Value 189 (0xbd)Operands Length 1Stack Uses thisStack Defs thisThrow if the value on top of the stack is the TDZ MagicValue. Used in derived class constructors. 
- JSOP_CHECKTHISREINIT [-1, +1]
- 
 Value 191 (0xbf)Operands Length 1Stack Uses thisStack Defs thisThrow an exception if the value on top of the stack is not the TDZ MagicValue. Used in derived class constructors. 
- JSOP_FUNCTIONTHIS [-0, +1]
- 
 Value 185 (0xb9)Operands Length 1Stack Uses Stack Defs thisDetermines the thisvalue for current function frame and pushes it onto the stack. Emitted in the prologue of functions with a this-binding.
- JSOP_GIMPLICITTHIS [-0, +1] (ATOM)
- 
 Value 157 (0x9d)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs thisPushes the implicit thisvalue for calls to the associated name onto the stack; only used when we know this implicit this will be our first non-syntactic scope.
- JSOP_GLOBALTHIS [-0, +1]
- 
 Value 186 (0xba)Operands Length 1Stack Uses Stack Defs thisPushes thisvalue for current stack frame onto the stack. Emitted whenthisrefers to the globalthis.
- JSOP_IMPLICITTHIS [-0, +1] (ATOM)
- 
 Value 226 (0xe2)Operands uint32_t nameIndexLength 5Stack Uses Stack Defs thisPushes the implicit thisvalue for calls to the associated name onto the stack.
Super
- JSOP_SUPERBASE [-0, +1]
- 
 Value 103 (0x67)Operands Length 1Stack Uses Stack Defs homeObjectProtoPushes the prototype of the home object for current callee onto the stack. 
- JSOP_SUPERFUN [-0, +1]
- 
 Value 164 (0xa4)Operands Length 1Stack Uses Stack Defs superFunFind the function to invoke with |super()| on the environment chain. 
Arguments
- JSOP_ARGUMENTS [-0, +1]
- 
 Value 9 (0x09)Operands Length 1Stack Uses Stack Defs argumentsPushes the argumentsobject for the current function activation.If JSScriptneedsArgsObj, then aJS_OPTIMIZED_ARGUMENTSmagic value is pushed. Otherwise, a proper arguments object is constructed and pushed.This opcode requires that the function does not have rest parameter. 
- JSOP_CALLEE [-0, +1]
- 
 Value 132 (0x84)Operands Length 1Stack Uses Stack Defs calleePushes current callee onto the stack. Used for named function expression self-naming, if lightweight. 
- JSOP_GETARG [-0, +1] (QARG , NAME)
- 
 Value 84 (0x54)Operands uint16_t argnoLength 3Stack Uses Stack Defs arguments[argno]Fast get op for function arguments and local variables. Pushes arguments[argno]onto the stack.
- JSOP_NEWTARGET [-0, +1]
- 
 Value 148 (0x94)Operands Length 1Stack Uses Stack Defs new.targetPush "new.target" 
- JSOP_REST [-0, +1] (TYPESET)
- 
 Value 224 (0xe0)Operands Length 1Stack Uses Stack Defs restCreates rest parameter array for current function call, and pushes it onto the stack. 
- JSOP_SETARG [-1, +1] (QARG , NAME)
- 
 Value 85 (0x55)Operands uint16_t argnoLength 3Stack Uses vStack Defs vFast set op for function arguments and local variables. Sets arguments[argno]as the top of stack value.
Var Scope
- JSOP_POPVARENV [-0, +0]
- 
 Value 181 (0xb5)Operands Length 1Stack Uses Stack Defs Pops a var environment from the env chain. 
- JSOP_PUSHVARENV [-0, +0] (SCOPE)
- 
 Value 180 (0xb4)Operands uint32_t scopeIndexLength 5Stack Uses Stack Defs Pushes a var environment onto the env chain. 
Operators
Comparison Operators
- JSOP_EQ [-2, +1] (LEFTASSOC, ARITH, DETECTING)
 JSOP_GE [-2, +1] (LEFTASSOC, ARITH)
 JSOP_GT [-2, +1] (LEFTASSOC, ARITH)
 JSOP_LE [-2, +1] (LEFTASSOC, ARITH)
 JSOP_LT [-2, +1] (LEFTASSOC, ARITH)
 JSOP_NE [-2, +1] (LEFTASSOC, ARITH, DETECTING)
- 
 Value JSOP_EQ: 18 (0x12)
 JSOP_GE: 23 (0x17)
 JSOP_GT: 22 (0x16)
 JSOP_LE: 21 (0x15)
 JSOP_LT: 20 (0x14)
 JSOP_NE: 19 (0x13)Operands Length 1Stack Uses lval, rvalStack Defs (lval OP rval)Pops the top two values from the stack and pushes the result of comparing them. 
- JSOP_STRICTEQ [-2, +1] (DETECTING, LEFTASSOC, ARITH)
 JSOP_STRICTNE [-2, +1] (DETECTING, LEFTASSOC, ARITH)
- 
 Value JSOP_STRICTEQ: 72 (0x48)
 JSOP_STRICTNE: 73 (0x49)Operands Length 1Stack Uses lval, rvalStack Defs (lval OP rval)Pops the top two values from the stack, then pushes the result of applying the operator to the two values. 
Arithmetic Operators
- JSOP_ADD [-2, +1] (LEFTASSOC, ARITH)
- 
 Value 27 (0x1b)Operands Length 1Stack Uses lval, rvalStack Defs (lval + rval)Pops the top two values lvalandrvalfrom the stack, then pushes the result oflval + rval.
- JSOP_DIV [-2, +1] (LEFTASSOC, ARITH)
 JSOP_MOD [-2, +1] (LEFTASSOC, ARITH)
 JSOP_MUL [-2, +1] (LEFTASSOC, ARITH)
 JSOP_SUB [-2, +1] (LEFTASSOC, ARITH)
- 
 Value JSOP_DIV: 30 (0x1e)
 JSOP_MOD: 31 (0x1f)
 JSOP_MUL: 29 (0x1d)
 JSOP_SUB: 28 (0x1c)Operands Length 1Stack Uses lval, rvalStack Defs (lval OP rval)Pops the top two values lvalandrvalfrom the stack, then pushes the result of applying the arithmetic operation to them.
- JSOP_NEG [-1, +1] (ARITH)
- 
 Value 34 (0x22)Operands Length 1Stack Uses valStack Defs (-val)Pops the value valfrom the stack, then pushes-val.
- JSOP_POS [-1, +1] (ARITH)
- 
 Value 35 (0x23)Operands Length 1Stack Uses valStack Defs (+val)Pops the value valfrom the stack, then pushes+val. (+valis the value converted to a number.)
- JSOP_POW [-2, +1] (ARITH)
- 
 Value 150 (0x96)Operands Length 1Stack Uses lval, rvalStack Defs (lval ** rval)Pops the top two values lvalandrvalfrom the stack, then pushes the result ofMath.pow(lval, rval).
Bitwise Logical Operators
- JSOP_BITAND [-2, +1] (LEFTASSOC, ARITH)
 JSOP_BITOR [-2, +1] (LEFTASSOC, ARITH)
 JSOP_BITXOR [-2, +1] (LEFTASSOC, ARITH)
- 
 Value JSOP_BITAND: 17 (0x11)
 JSOP_BITOR: 15 (0x0f)
 JSOP_BITXOR: 16 (0x10)Operands Length 1Stack Uses lval, rvalStack Defs (lval OP rval)Pops the top two values lvalandrvalfrom the stack, then pushes the result of the operation applied to the two operands, converting both to 32-bit signed integers if necessary.
- JSOP_BITNOT [-1, +1] (ARITH)
- 
 Value 33 (0x21)Operands Length 1Stack Uses valStack Defs (~val)Pops the value valfrom the stack, then pushes~val.
Bitwise Shift Operators
- JSOP_LSH [-2, +1] (LEFTASSOC, ARITH)
 JSOP_RSH [-2, +1] (LEFTASSOC, ARITH)
- 
 Value JSOP_LSH: 24 (0x18)
 JSOP_RSH: 25 (0x19)Operands Length 1Stack Uses lval, rvalStack Defs (lval OP rval)Pops the top two values lvalandrvalfrom the stack, then pushes the result of the operation applied to the operands.
- JSOP_URSH [-2, +1] (LEFTASSOC, ARITH)
- 
 Value 26 (0x1a)Operands Length 1Stack Uses lval, rvalStack Defs (lval >>> rval)Pops the top two values lvalandrvalfrom the stack, then pusheslval >>> rval.
Logical Operators
- JSOP_NOT [-1, +1] (ARITH, DETECTING)
- 
 Value 32 (0x20)Operands Length 1Stack Uses valStack Defs (!val)Pops the value valfrom the stack, then pushes!val.
Special Operators
- JSOP_DELELEM [-2, +1] (BYTE , ELEM, CHECKSLOPPY)
- 
 Value 38 (0x26)Operands Length 1Stack Uses obj, propvalStack Defs succeededPops the top two values on the stack as propvalandobj, deletespropvalproperty fromobj, pushestrueonto the stack if succeeded,falseif not.
- JSOP_DELPROP [-1, +1] (ATOM, PROP, CHECKSLOPPY)
- 
 Value 37 (0x25)Operands uint32_t nameIndexLength 5Stack Uses objStack Defs succeededPops the top of stack value, deletes property from it, pushes trueonto the stack if succeeded,falseif not.
- JSOP_IN [-2, +1] (LEFTASSOC)
- 
 Value 113 (0x71)Operands Length 1Stack Uses id, objStack Defs (id in obj)Pops the top two values idandobjfrom the stack, then pushesid in obj. This will throw aTypeErrorifobjis not an object.Note that objis the top value.
- JSOP_INSTANCEOF [-2, +1] (LEFTASSOC)
- 
 Value 114 (0x72)Operands Length 1Stack Uses obj, ctorStack Defs (obj instanceof ctor)Pops the top two values objandctorfrom the stack, then pushesobj instanceof ctor. This will throw aTypeErrorifobjis not an object.
- JSOP_STRICTDELPROP [-1, +1] (ATOM, PROP, CHECKSTRICT)
- 
 Value 46 (0x2e)Operands uint32_t nameIndexLength 5Stack Uses objStack Defs succeededPops the top of stack value and attempts to delete the given property from it. Pushes trueonto success, else throws a TypeError per strict mode property-deletion requirements.
- JSOP_TYPEOF [-1, +1] (DETECTING)
- 
 Value 39 (0x27)Operands Length 1Stack Uses valStack Defs (typeof val)Pops the value valfrom the stack, then pushestypeof val.
- JSOP_TYPEOFEXPR [-1, +1] (DETECTING)
- 
 Value 196 (0xc4)Operands Length 1Stack Uses valStack Defs (typeof val)Pops the top stack value as valand pushestypeof val. Note that this opcode isn't used when, in the original source code,valis a name -- seeJSOP_TYPEOFtypeof undefinedName === "undefined".)
- JSOP_VOID [-1, +1]
- 
 Value 40 (0x28)Operands Length 1Stack Uses valStack Defs undefinedPops the top value on the stack and pushes undefined.
Stack Operations
- JSOP_DUP [-1, +2]
- 
 Value 12 (0x0c)Operands Length 1Stack Uses vStack Defs v, vPushes a copy of the top value on the stack. 
- JSOP_DUP2 [-2, +4]
- 
 Value 13 (0x0d)Operands Length 1Stack Uses v1, v2Stack Defs v1, v2, v1, v2Duplicates the top two values on the stack. 
- JSOP_DUPAT [-0, +1] (UINT24)
- 
 Value 44 (0x2c)Operands uint24_t nLength 4Stack Uses v[n], v[n-1], ..., v[1], v[0]Stack Defs v[n], v[n-1], ..., v[1], v[0], v[n]Duplicates the Nth value from the top onto the stack. 
- JSOP_PICK [-0, +0] (UINT8)
- 
 Value 133 (0x85)Operands uint8_t nLength 2Stack Uses v[n], v[n-1], ..., v[1], v[0]Stack Defs v[n-1], ..., v[1], v[0], v[n]Picks the nth element from the stack and moves it to the top of the stack. 
- JSOP_POP [-1, +0]
- 
 Value 81 (0x51)Operands Length 1Stack Uses vStack Defs Pops the top value off the stack. 
- JSOP_POPN [-n, +0] (UINT16)
- 
 Value 11 (0x0b)Operands uint16_t nLength 3Stack Uses v[n-1], ..., v[1], v[0]Stack Defs Pops the top nvalues from the stack.
- JSOP_SWAP [-2, +2]
- 
 Value 10 (0x0a)Operands Length 1Stack Uses v1, v2Stack Defs v2, v1Swaps the top two values on the stack. This is useful for things like post-increment/decrement. 
- JSOP_UNPICK [-0, +0] (UINT8)
- 
 Value 183 (0xb7)Operands uint8_t nLength 2Stack Uses v[n], v[n-1], ..., v[1], v[0]Stack Defs v[0], v[n], v[n-1], ..., v[1]Moves the top of the stack value under the nth element of the stack. 
Debugger
- JSOP_DEBUGAFTERYIELD [-0, +0]
- 
 Value 208 (0xd0)Operands Length 1Stack Uses Stack Defs Bytecode emitted after yieldexpressions to help the Debugger fix up the frame in the JITs. No-op in the interpreter.
Literals
Constants
- JSOP_DOUBLE [-0, +1] (DOUBLE)
- 
 Value 60 (0x3c)Operands uint32_t constIndexLength 5Stack Uses Stack Defs valPushes numeric constant onto the stack. 
- JSOP_FALSE [-0, +1]
 JSOP_TRUE [-0, +1]
- 
 Value JSOP_FALSE: 66 (0x42)
 JSOP_TRUE: 67 (0x43)Operands Length 1Stack Uses Stack Defs true/falsePushes boolean value onto the stack. 
- JSOP_INT32 [-0, +1] (INT32)
- 
 Value 216 (0xd8)Operands int32_t valLength 5Stack Uses Stack Defs valPushes 32-bit int immediate integer operand onto the stack. 
- JSOP_INT8 [-0, +1] (INT8)
- 
 Value 215 (0xd7)Operands int8_t valLength 2Stack Uses Stack Defs valPushes 8-bit int immediate integer operand onto the stack. 
- JSOP_IS_CONSTRUCTING [-0, +1]
- 
 Value 65 (0x41)Operands Length 1Stack Uses Stack Defs JS_IS_CONSTRUCTINGPushes JS_IS_CONSTRUCTING
- JSOP_NULL [-0, +1]
- 
 Value 64 (0x40)Operands Length 1Stack Uses Stack Defs nullPushes nullonto the stack.
- JSOP_ONE [-0, +1]
- 
 Value 63 (0x3f)Operands Length 1Stack Uses Stack Defs 1Pushes 1onto the stack.
- JSOP_STRING [-0, +1] (ATOM)
- 
 Value 61 (0x3d)Operands uint32_t atomIndexLength 5Stack Uses Stack Defs stringPushes string constant onto the stack. 
- JSOP_SYMBOL [-0, +1] (UINT8)
- 
 Value 45 (0x2d)Operands uint8_t n, the JS::SymbolCode of the symbol to useLength 2Stack Uses Stack Defs symbolPush a well-known symbol onto the operand stack. 
- JSOP_UINT16 [-0, +1] (UINT16)
- 
 Value 88 (0x58)Operands uint16_t valLength 3Stack Uses Stack Defs valPushes unsigned 16-bit int immediate integer operand onto the stack. 
- JSOP_UINT24 [-0, +1] (UINT24)
- 
 Value 188 (0xbc)Operands uint24_t valLength 4Stack Uses Stack Defs valPushes unsigned 24-bit int immediate integer operand onto the stack. 
- JSOP_UNDEFINED [-0, +1]
- 
 Value 1 (0x01)Operands Length 1Stack Uses Stack Defs undefinedPushes undefinedonto the stack.
- JSOP_UNINITIALIZED [-0, +1]
- 
 Value 142 (0x8e)Operands Length 1Stack Uses Stack Defs uninitializedPushes a JS_UNINITIALIZED_LEXICALvalue onto the stack, representing an uninitialized lexical binding.This opcode is used with the JSOP_INITLETopcode.
- JSOP_ZERO [-0, +1]
- 
 Value 62 (0x3e)Operands Length 1Stack Uses Stack Defs 0Pushes 0onto the stack.
Object
- JSOP_CALLELEM [-2, +1] (BYTE , ELEM, TYPESET, LEFTASSOC)
- 
 Value 193 (0xc1)Operands Length 1Stack Uses obj, propvalStack Defs obj[propval]Pops the top two values on the stack as propvalandobj, pushespropvalproperty ofobjonto the stack.Like JSOP_GETELEMbut for call context.
- JSOP_CALLPROP [-1, +1] (ATOM, PROP, TYPESET)
- 
 Value 184 (0xb8)Operands uint32_t nameIndexLength 5Stack Uses objStack Defs obj[name]Pops the top of stack value, pushes property of it onto the stack. Like JSOP_GETPROPbut for call context.
- JSOP_CALLSITEOBJ [-0, +1] (OBJECT)
- 
 Value 101 (0x65)Operands uint32_t objectIndexLength 5Stack Uses Stack Defs objPushes the call site object specified by objectIndex onto the stack. Defines the raw property specified by objectIndex + 1 on the call site object and freezes both the call site object as well as its raw property. 
- JSOP_CHECKOBJCOERCIBLE [-1, +1]
- 
 Value 163 (0xa3)Operands Length 1Stack Uses valStack Defs valThrow if the value on the stack is not coerscible to an object (is |null| or |undefined|). 
- JSOP_CLASSHERITAGE [-1, +2]
- 
 Value 51 (0x33)Operands Length 1Stack Uses heritageStack Defs funcProto, objProtoWrites the [[Prototype]] objects for both a class and its .prototype to the stack, given the result of a heritage expression. 
- JSOP_GETBOUNDNAME [-1, +1] (ATOM, NAME, TYPESET)
- 
 Value 195 (0xc3)Operands uint32_t nameIndexLength 5Stack Uses envStack Defs vPops an environment, gets the value of a bound name on it. If the name is not bound to the environment, throw a ReferenceError. Used in conjunction with BINDNAME. 
- JSOP_GETELEM [-2, +1] (BYTE , ELEM, TYPESET, LEFTASSOC)
- 
 Value 55 (0x37)Operands Length 1Stack Uses obj, propvalStack Defs obj[propval]Pops the top two values on the stack as propvalandobj, pushespropvalproperty ofobjonto the stack.
- JSOP_GETELEM_SUPER [-3, +1] (BYTE , ELEM, LEFTASSOC)
- 
 Value 125 (0x7d)Operands Length 1Stack Uses receiver, obj, propvalStack Defs obj[propval]LIKE JSOP_GETELEMbut takes receiver on stack, and the propval is evaluated before the obj.
- JSOP_GETPROP [-1, +1] (ATOM, PROP, TYPESET)
- 
 Value 53 (0x35)Operands uint32_t nameIndexLength 5Stack Uses objStack Defs obj[name]Pops the top of stack value, pushes property of it onto the stack. 
- JSOP_GETPROP_SUPER [-2, +1] (ATOM, PROP)
- 
 Value 104 (0x68)Operands uint32_t nameIndexLength 5Stack Uses receiver, objStack Defs obj[name]Pops the top two values, and pushes the property of one, using the other as the receiver. 
- JSOP_INITELEM [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 94 (0x5e)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a numeric property in an object literal, like {1: x}.Pops the top three values on the stack as val,idandobj, definesidproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITELEM_GETTER [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 99 (0x63)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a numeric getter in an object literal like {get 2() {}}.Pops the top three values on the stack as val,idandobj, definesidgetter ofobjasval, pushesobjonto the stack.
- JSOP_INITELEM_SETTER [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 100 (0x64)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a numeric setter in an object literal like {set 2(v) {}}.Pops the top three values on the stack as val,idandobj, definesidsetter ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENELEM [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 175 (0xaf)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a non-enumerable numeric property in an object literal, like {1: x}.Pops the top three values on the stack as val,idandobj, definesidproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENELEM_GETTER [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 173 (0xad)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a non-enumerable numeric getter in an object literal like {get 2() {}}.Pops the top three values on the stack as val,idandobj, definesidgetter ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENELEM_SETTER [-3, +1] (ELEM, PROPINIT, DETECTING)
- 
 Value 174 (0xae)Operands Length 1Stack Uses obj, id, valStack Defs objInitialize a non-enumerable numeric setter in an object literal like {set 2(v) {}}.Pops the top three values on the stack as val,idandobj, definesidsetter ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 147 (0x93)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a non-enumerable data-property on an object. Pops the top two values on the stack as valandobj, definesnameIndexproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENPROP_GETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 171 (0xab)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a non-enumerable getter in an object literal. Pops the top two values on the stack as valandobj, defines getter ofobjasval, pushesobjonto the stack.
- JSOP_INITHIDDENPROP_SETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 172 (0xac)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a non-enumerable setter in an object literal. Pops the top two values on the stack as valandobj, defines setter ofobjasval, pushesobjonto the stack.
- JSOP_INITHOMEOBJECT [-2, +2] (UINT8)
- 
 Value 92 (0x5c)Operands uint8_t nLength 2Stack Uses homeObject, [...n], funStack Defs homeObject, [...n], funInitialize the home object for functions with super bindings. This opcode takes the function and the object to be the home object, does the set, and leaves both on the stack. 
- JSOP_INITLOCKEDPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 146 (0x92)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a non-configurable, non-writable, non-enumerable data-property on an object. Pops the top two values on the stack as valandobj, definesnameIndexproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 93 (0x5d)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a named property in an object literal, like {a: x}.Pops the top two values on the stack as valandobj, definesnameIndexproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITPROP_GETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 97 (0x61)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a getter in an object literal. Pops the top two values on the stack as valandobj, defines getter ofobjasval, pushesobjonto the stack.
- JSOP_INITPROP_SETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)
- 
 Value 98 (0x62)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs objInitialize a setter in an object literal. Pops the top two values on the stack as valandobj, defines setter ofobjasval, pushesobjonto the stack.
- JSOP_MUTATEPROTO [-2, +1]
- 
 Value 194 (0xc2)Operands Length 1Stack Uses obj, newProtoStack Defs succeeded__proto__: vinside an object initializer.Pops the top two values on the stack as newProtoandobj, sets prototype ofobjasnewProto, pushestrueonto the stack if succeeded,falseif not.
- JSOP_NEWINIT [-0, +1] (UINT8)
- 
 Value 89 (0x59)Operands uint8_t kind (, uint24_t extra)Length 5Stack Uses Stack Defs objPushes newly created object onto the stack. This opcode takes the kind of initializer ( JSProto_Array orJSProto_Object).This opcode has three extra bytes so it can be exchanged with JSOP_NEWOBJECTduring emit.
- JSOP_NEWOBJECT [-0, +1] (OBJECT)
- 
 Value 91 (0x5b)Operands uint32_t baseobjIndexLength 5Stack Uses Stack Defs objPushes newly created object onto the stack. This opcode takes an object with the final shape, which can be set at the start and slots then filled in directly. 
- JSOP_OBJECT [-0, +1] (OBJECT)
- 
 Value 80 (0x50)Operands uint32_t objectIndexLength 5Stack Uses Stack Defs objPushes deep-cloned object literal or singleton onto the stack. 
- JSOP_OBJWITHPROTO [-1, +1]
- 
 Value 83 (0x53)Operands Length 1Stack Uses protoStack Defs objPushes newly created object onto the stack with provided [[Prototype]]. 
- JSOP_SETELEM [-3, +1] (BYTE , ELEM, PROPSET, DETECTING, CHECKSLOPPY)
- 
 Value 56 (0x38)Operands Length 1Stack Uses obj, propval, valStack Defs valPops the top three values on the stack as val,propvalandobj, setspropvalproperty ofobjasval, pushesobjonto the stack.
- JSOP_SETELEM_SUPER [-4, +1] (BYTE , ELEM, PROPSET, DETECTING, CHECKSLOPPY)
- 
 Value 158 (0x9e)Operands Length 1Stack Uses propval, receiver, obj, valStack Defs valLIKE JSOP_SETELEM, but takes receiver on the stack, and the propval is evaluated before the base.
- JSOP_SETPROP [-2, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSLOPPY)
- 
 Value 54 (0x36)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs valPops the top two values on the stack as valandobjand performsobj.prop = val, pushingvalback onto the stack.
- JSOP_SETPROP_SUPER [-3, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSLOPPY)
- 
 Value 107 (0x6b)Operands uint32_t nameIndexLength 5Stack Uses receiver, obj, valStack Defs valPops the top three values on the stack as val,objandreceiver, and performsobj.prop = val, pushingvalback onto the stack.
- JSOP_STRICTDELELEM [-2, +1] (ELEM, CHECKSTRICT)
- 
 Value 47 (0x2f)Operands Length 1Stack Uses obj, propvalStack Defs succeededPops the top two values on the stack as propvalandobj, and attempts to deletepropvalproperty fromobj. Pushestrueonto the stack on success, else throws a TypeError per strict mode property deletion requirements.
- JSOP_STRICTSETELEM [-3, +1] (BYTE , ELEM, PROPSET, DETECTING, CHECKSTRICT)
- 
 Value 57 (0x39)Operands Length 1Stack Uses obj, propval, valStack Defs valPops the top three values on the stack as val,propvalandobj, setspropvalproperty ofobjasval, pushesobjonto the stack. Throws a TypeError if the set fails, per strict mode semantics.
- JSOP_STRICTSETELEM_SUPER [-4, +1] (BYTE , ELEM, PROPSET, DETECTING, CHECKSTRICT)
- 
 Value 159 (0x9f)Operands Length 1Stack Uses propval, receiver, obj, valStack Defs valLIKE JSOP_STRICTSETELEM, but takes receiver on the stack, and the propval is evaluated before the base.
- JSOP_STRICTSETPROP [-2, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSTRICT)
- 
 Value 48 (0x30)Operands uint32_t nameIndexLength 5Stack Uses obj, valStack Defs valPops the top two values on the stack as valandobj, and performsobj.prop = val, pushingvalback onto the stack. Throws a TypeError if the set-operation failed (per strict mode semantics).
- JSOP_STRICTSETPROP_SUPER [-3, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSTRICT)
- 
 Value 105 (0x69)Operands uint32_t nameIndexLength 5Stack Uses receiver, obj, valStack Defs valPops the top three values on the stack as valandobj, andreceiver, and performsobj.prop = val, pushingvalback onto the stack. Throws a TypeError if the set-operation failed (per strict mode semantics).
- JSOP_TOID [-1, +1]
- 
 Value 225 (0xe1)Operands Length 1Stack Uses propertyNameValueStack Defs propertyKeyReplace the top-of-stack value propertyNameValue with ToPropertyKey(propertyNameValue). 
Array
- JSOP_ARRAYPUSH [-2, +0]
- 
 Value 206 (0xce)Operands Length 1Stack Uses v, objStack Defs Pops the top two values on the stack as objandv, pushesvtoobj.This opcode is used for Array Comprehension. 
- JSOP_HOLE [-0, +1]
- 
 Value 218 (0xda)Operands Length 1Stack Uses Stack Defs holePushes a JS_ELEMENTS_HOLEvalue 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_NEWARRAYopcode.
- JSOP_INITELEM_ARRAY [-2, +1] (UINT32, ELEM, PROPINIT, DETECTING)
- 
 Value 96 (0x60)Operands uint32_t indexLength 5Stack Uses obj, valStack Defs objInitialize an array element. Pops the top two values on the stack as valandobj, setsindexproperty ofobjasval, pushesobjonto the stack.
- JSOP_INITELEM_INC [-3, +2] (ELEM, PROPINIT)
- 
 Value 95 (0x5f)Operands Length 1Stack Uses obj, index, valStack Defs obj, (index + 1)Pops the top three values on the stack as val,indexandobj, setsindexproperty ofobjasval, pushesobjandindex + 1onto the stack.This opcode is used in Array literals with spread and spreadcall arguments. 
- JSOP_LENGTH [-1, +1] (ATOM, PROP, TYPESET)
- 
 Value 217 (0xd9)Operands uint32_t nameIndexLength 5Stack Uses objStack Defs obj['length']Pops the top of stack value, pushes the lengthproperty of it onto the stack.
- JSOP_NEWARRAY [-0, +1] (UINT32)
- 
 Value 90 (0x5a)Operands uint32_t lengthLength 5Stack Uses Stack Defs objPushes newly created array onto the stack. This opcode takes the final length, which is preallocated. 
- JSOP_NEWARRAY_COPYONWRITE [-0, +1] (OBJECT)
- 
 Value 102 (0x66)Operands uint32_t objectIndexLength 5Stack Uses Stack Defs objPushes a newly created array onto the stack, whose elements are the same as that of a template object's copy on write elements. 
- JSOP_SPREADCALLARRAY [-0, +1] (UINT32)
- 
 Value 126 (0x7e)Operands uint32_t lengthLength 5Stack Uses Stack Defs objPushes newly created array for a spread call onto the stack. This has the same semantics as JSOP_NEWARRAY, but is distinguished to avoid using unboxed arrays in spread calls, which would make compiling spread calls in baseline more complex.
RegExp
- JSOP_REGEXP [-0, +1] (REGEXP)
- 
 Value 160 (0xa0)Operands uint32_t regexpIndexLength 5Stack Uses Stack Defs regexpPushes a regular expression literal onto the stack. It requires special "clone on exec" handling. 
Class
- JSOP_CLASSCONSTRUCTOR [-0, +1] (ATOM)
- 
 Value 167 (0xa7)Operands atom classNameLength 5Stack Uses Stack Defs constructorPush a default constructor for a base class literal. 
- JSOP_DERIVEDCONSTRUCTOR [-1, +1] (ATOM)
- 
 Value 168 (0xa8)Operands atom classNameLength 5Stack Uses protoStack Defs constructorPush a default constructor for a derived class literal. 
Other
- JSOP_DEBUGCHECKSELFHOSTED [-1, +1]
- 
 Value 177 (0xb1)Operands Length 1Stack Uses checkValStack Defs checkValExamines the top stack value, asserting that it's either a self-hosted function or a self-hosted intrinsic. This opcode does nothing in a non-debug build. 
- JSOP_FORCEINTERPRETER [-0, +0]
- 
 Value 207 (0xcf)Operands Length 1Stack Uses Stack Defs No-op bytecode only emitted in some self-hosted functions. Not handled by the JITs so the script always runs in the interpreter. 
- JSOP_JUMPTARGET [-0, +0]
- 
 Value 230 (0xe6)Operands Length 1Stack Uses Stack Defs This opcode is a no-op and it indicates the location of a jump instruction target. Some other opcodes act as jump targets, such as LOOPENTRY, as well as all which are matched by BytecodeIsJumpTarget function. 
- JSOP_LINENO [-0, +0] (UINT32)
- 
 Value 119 (0x77)Operands uint32_t linenoLength 5Stack Uses Stack Defs Embedded lineno to speedup pc->linemapping.
- JSOP_NOP [-0, +0]
- 
 Value 0 (0x00)Operands Length 1Stack Uses Stack Defs No operation is performed. 
- JSOP_NOP_DESTRUCTURING [-0, +0]
- 
 Value 229 (0xe5)Operands Length 1Stack Uses Stack Defs No-op used by the decompiler to produce nicer error messages about destructuring code. 
- JSOP_TOSTRING [-1, +1]
- 
 Value 228 (0xe4)Operands Length 1Stack Uses valStack Defs ToString(val)Converts the value on the top of the stack to a String