With the opcode byte value indicated respective to each stable version of the React Native Hermes VM bytecode format, as well as the auto-generated documentation from the "BytecodeList.def" file from the Hermes VM source tree.
This list of opcodes is used by the hermes-dec open-source reverse engineering project.
| Instruction | Bytecode version to opcode | Documentation | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 51 | 58 | 59 | 62 | 70 | 73 | 76 | 83 | 84 | 89 | 90 | 92 | 95 | 97 | 98 | 99 | ||
| Add | 21 | 21 | 21 | 21 | 21 | 21 | 21 | 22 | 22 | 22 | 22 | 22 | 22 | 22 | 30 | 30 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 + Arg3 (JS addition/concatenation) |
| Add32 | 185 | 190 | 190 | 192 | 192 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 + Arg3 (32-bit integer addition) |
|||||||||||
| AddEmptyString | 113 | 115 | 116 | 116 | 116 | 116 | 116 | 121 | 121 | 126 | 126 | 128 | 128 | 136 | 157 | 158 | Reg8, Reg8 (total size 2) Convert a value to a string as if evaluating the expression: Arg1 = "" + Arg2 In practice this means Arg1 = ToString(ToPrimitive(Arg2, PreferredType::NONE)) with ToPrimitive (ES5.1 9.1) and ToString (ES5.1 9.8). |
| AddN | 22 | 22 | 22 | 22 | 22 | 22 | 22 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 31 | 31 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 + Arg3 (Numeric addition, skips number check) |
| AddOwnPrivateBySym | 100 | 100 | Reg8, Reg8, Reg8 (total size 3) Add a private property to an object. This must be a new property. The property will be added with the privateName flag set on the PropertyFlags. Arg1[Arg2] = Arg3 |
||||||||||||||
| AddS | 24 | 32 | 32 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 + Arg3 (String concat, skips string check) |
|||||||||||||
| AsyncBreakCheck | 91 | 91 | 91 | 91 | 94 | 94 | 96 | 96 | 98 | 98 | 110 | 126 | 126 | (total size 0) Fast check for an async interrupt request. |
|||
| BitAnd | 33 | 33 | 33 | 33 | 33 | 33 | 33 | 34 | 34 | 34 | 34 | 34 | 34 | 35 | 43 | 43 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 & Arg3 (JS bitwise AND) |
| BitNot | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 20 | 20 | Reg8, Reg8 (total size 2) Arg1 = ~Arg2 (Bitwise not) |
| BitOr | 35 | 35 | 35 | 35 | 35 | 35 | 35 | 36 | 36 | 36 | 36 | 36 | 36 | 37 | 45 | 45 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 | Arg3 (JS bitwise OR) |
| BitXor | 34 | 34 | 34 | 34 | 34 | 34 | 34 | 35 | 35 | 35 | 35 | 35 | 35 | 36 | 44 | 44 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 ^ Arg3 (JS bitwise XOR) |
| CacheNewObject | 15 | Reg8, Reg8, UInt32, UInt8 (total size 7) Perform a lookup on the new object cache. Arg1 = the 'this' value to lookup Arg2 = the new target to determine whether it is a constructor call Arg3 = the index in the shape table. Arg4 = the cache index within the current function |
|||||||||||||||
| Call | 74 | 74 | 74 | 74 | 74 | 74 | 74 | 75 | 75 | 77 | 77 | 79 | 79 | 93 | 106 | 106 | Reg8, Reg8, UInt8 (total size 3) Call a function. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the number of arguments, assumed to be found in reverse order from the end of the current frame. |
| Call1 | 76 | 76 | 76 | 76 | 76 | 76 | 76 | 77 | 77 | 79 | 79 | 81 | 81 | 95 | 108 | 108 | Reg8, Reg8, Reg8 (total size 3) Call a function with one arg. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the first argument. |
| Call2 | 78 | 78 | 78 | 78 | 78 | 78 | 78 | 79 | 79 | 81 | 81 | 83 | 83 | 97 | 110 | 110 | Reg8, Reg8, Reg8, Reg8 (total size 4) Call a function with two args. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the first argument. Arg4 is the second argument. |
| Call3 | 79 | 79 | 79 | 79 | 79 | 79 | 79 | 80 | 80 | 82 | 82 | 84 | 84 | 98 | 111 | 111 | Reg8, Reg8, Reg8, Reg8, Reg8 (total size 5) Call a function with three args. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the first argument. Arg4 is the second argument. Arg5 is the third argument. |
| Call4 | 80 | 80 | 80 | 80 | 80 | 80 | 80 | 81 | 81 | 83 | 83 | 85 | 85 | 99 | 112 | 112 | Reg8, Reg8, Reg8, Reg8, Reg8, Reg8 (total size 6) Call a function with four args. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the first argument. Arg4 is the second argument. Arg5 is the third argument. Arg6 is the fourth argument. |
| CallBuiltin | 84 | 84 | 84 | 84 | 84 | 84 | 84 | 85 | 85 | 87 | 87 | 89 | 89 | 101 | 115 | 115 | Reg8, UInt8, UInt8 (total size 3) Call a builtin function. Note this is NOT marked as a Ret target, because the callee is native and therefore never JS. Arg1 is the destination of the return value. Arg2 is the builtin number. Arg3 is the number of arguments, assumed to be found in reverse order from the end of the current frame. thisArg is set to "undefined". |
| CallBuiltinLong | 86 | 86 | 88 | 88 | 90 | 90 | 102 | 116 | 116 | Reg8, UInt8, UInt32 (total size 6) Call a builtin function. Note this is NOT marked as a Ret target, because the callee is native and therefore never JS. Arg1 is the destination of the return value. Arg2 is the builtin number. Arg3 is the number of arguments, assumed to be found in reverse order from the end of the current frame. thisArg is set to "undefined". |
|||||||
| CallDirect | 77 | 77 | 77 | 77 | 77 | 77 | 77 | 78 | 78 | 80 | 80 | 82 | 82 | Reg8, UInt8, UInt16 (function_id) (total size 4) Call a function directly without a closure. Arg1 is the destination of the return value. Arg2 is the number of arguments, assumed to be found in reverse order from the end of the current frame. The first argument 'this' is assumed to be created with CreateThis. Arg3 is index in the function table. Note that we expect the variable-sized argument to be last. |
|||
| CallDirectLongIndex | 83 | 83 | 83 | 83 | 83 | 83 | 83 | 84 | 84 | 86 | 86 | 88 | 88 | Reg8, UInt8, UInt32 (total size 6) Identical to CallDirect, but the function index is 32-bit. |
|||
| CallLong | 81 | 81 | 81 | 81 | 81 | 81 | 81 | 82 | 82 | 84 | 84 | 86 | 86 | Reg8, Reg8, UInt32 (total size 6) Identical to Call, but allowing more arguments. |
|||
| CallRequire | 114 | 114 | Reg8, Reg8, UInt32 (total size 6) A Metro require call. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the module index argument, as an immediate. |
||||||||||||||
| CallWithNewTarget | 96 | 109 | 109 | Reg8, Reg8, Reg8, UInt8 (total size 4) Call a function with an explicitly specified `new.target`. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the value of new.target Arg4 is the number of arguments, assumed to be found in reverse order from the end of the current frame. |
|||||||||||||
| CallWithNewTargetLong | 100 | 113 | 113 | Reg8, Reg8, Reg8, Reg8 (total size 4) Identical to CallWithNewTarget, but allowing more arguments. arg4 is a register containing a number, instead of a literal number. This is done to decrease the size of this opcode. |
|||||||||||||
| Catch | 86 | 86 | 86 | 86 | 86 | 86 | 86 | 89 | 89 | 91 | 91 | 93 | 93 | 105 | 119 | 119 | Reg8 (total size 1) Catch an exception (the first instruction in an exception handler). } catch(Arg1) { |
| CoerceThisNS | 109 | 111 | 112 | 112 | 112 | 112 | 112 | 117 | 117 | 121 | 121 | 123 | 123 | 131 | 152 | 152 | Reg8, Reg8 (total size 2) Coerce a value assumed to contain 'this' to an object using non-strict mode rules. Primitives are boxed, \c null or \c undefed produce the global object. Arg1 = coerce_to_object(Arg2) |
| CompleteGenerator | 123 | 124 | 124 | 124 | 124 | 124 | 129 | 129 | 134 | 134 | 136 | 136 | (total size 0) Set the generator status to complete, but do not return. |
||||
| Construct | 75 | 75 | 75 | 75 | 75 | 75 | 75 | 76 | 76 | 78 | 78 | 80 | 80 | 94 | 107 | 107 | Reg8, Reg8, UInt8 (total size 3) Call a constructor, with semantics identical to Call. Arg1 is the destination of the return value. Arg2 is the closure to invoke. Arg3 is the number of arguments, assumed to be found in reverse order from the end of the current frame. The first argument 'this' is assumed to be created with CreateThis. |
| ConstructLong | 82 | 82 | 82 | 82 | 82 | 82 | 82 | 83 | 83 | 85 | 85 | 87 | 87 | Reg8, Reg8, UInt32 (total size 6) Identical to Construct, but allowing more arguments. |
|||
| CreateAsyncClosure | 100 | 100 | 102 | 102 | 104 | 104 | Reg8, Reg8, UInt16 (function_id) (total size 4) Create a closure for an AsyncFunction. Arg1 is the register in which to store the closure. Arg2 is the current environment as loaded by GetEnvironment 0. Arg3 is index in the function table. |
||||||||||
| CreateAsyncClosureLongIndex | 101 | 101 | 103 | 103 | 105 | 105 | Reg8, Reg8, UInt32 (function_id) (total size 6) Create a closure for an AsyncFunction. Arg1 is the register in which to store the closure. Arg2 is the current environment as loaded by GetEnvironment 0. Arg3 is index in the function table. |
||||||||||
| CreateBaseClass | 128 | 128 | Reg8, Reg8, Reg8, UInt16 (total size 5) Create a base class. Arg1 is the output register for the the closure. Arg2 is the output register for the home object. Arg3 is the current environment. Arg4 is index in the function table. |
||||||||||||||
| CreateBaseClassLongIndex | 129 | 129 | Reg8, Reg8, Reg8, UInt32 (total size 7) Create a base class. Arg1 is the output register for the the closure. Arg2 is the output register for the home object. Arg3 is the current environment. Arg4 is index in the function table. |
||||||||||||||
| CreateClosure | 93 | 93 | 94 | 94 | 94 | 94 | 94 | 96 | 96 | 98 | 98 | 100 | 100 | 112 | 132 | 132 | Reg8, Reg8, UInt16 (function_id) (total size 4) Create a closure. Arg1 is the register in which to store the closure. Arg2 is the parent environment of the closure, or undefined. Arg3 is index in the function table. |
| CreateClosureLongIndex | 94 | 94 | 95 | 95 | 95 | 95 | 95 | 97 | 97 | 99 | 99 | 101 | 101 | 113 | 133 | 133 | Reg8, Reg8, UInt32 (function_id) (total size 6) Create a closure. Arg1 is the register in which to store the closure. Arg2 is the parent environment of the closure, or undefined. Arg3 is index in the function table. |
| CreateDerivedClass | 130 | 130 | Reg8, Reg8, Reg8, Reg8, UInt16 (total size 6) Create a derived class. Arg1 is the output register for the the closure. Arg2 is the output register for the home object. Arg3 is the current environment. Arg4 is the superClass. Arg5 is index in the function table. |
||||||||||||||
| CreateDerivedClassLongIndex | 131 | 131 | Reg8, Reg8, Reg8, Reg8, UInt32 (total size 8) Create a derived class. Arg1 is the output register for the the closure. Arg2 is the output register for the home object. Arg3 is the current environment. Arg4 is the superClass. Arg5 is index in the function table. |
||||||||||||||
| CreateEnvironment | 47 | 47 | 47 | 47 | 47 | 47 | 47 | 48 | 48 | 50 | 50 | 50 | 50 | 55 | 66 | 66 | Reg8, Reg8, UInt32 (total size 6) Create a new environment with the given parent. Arg1 is the destination. Arg2 is the parent environment to use. Arg3 is the size of the new environment. |
| CreateFunctionEnvironment | 53 | 64 | 64 | Reg8, UInt8 (total size 2) Create a new environment, using the current function's enclosing environment as the parent. Arg1 is the destination. Arg2 is the size of the new environment. |
|||||||||||||
| CreateGenerator | 124 | 125 | 125 | 125 | 125 | 125 | 130 | 130 | 135 | 135 | 137 | 137 | 144 | 168 | 169 | Reg8, Reg8, UInt16 (function_id) (total size 4) Create a generator. Arg1 is the register in which to store the generator. Arg2 is the parent environment of the generator, or undefined. Arg3 is index in the function table. |
|
| CreateGeneratorClosure | 95 | 96 | 96 | 96 | 96 | 96 | 98 | 98 | 100 | 100 | 102 | 102 | Reg8, Reg8, UInt16 (function_id) (total size 4) Create a closure for a GeneratorFunction. Arg1 is the register in which to store the closure. Arg2 is the current environment as loaded by GetEnvironment 0. Arg3 is index in the function table. |
||||
| CreateGeneratorClosureLongIndex | 96 | 97 | 97 | 97 | 97 | 97 | 99 | 99 | 101 | 101 | 103 | 103 | Reg8, Reg8, UInt32 (function_id) (total size 6) Create a closure for a GeneratorFunction. Arg1 is the register in which to store the closure. Arg2 is the current environment as loaded by GetEnvironment 0. Arg3 is index in the function table. |
||||
| CreateGeneratorLongIndex | 125 | 126 | 126 | 126 | 126 | 126 | 131 | 131 | 136 | 136 | 138 | 138 | 145 | 169 | 170 | Reg8, Reg8, UInt32 (function_id) (total size 6) Create a generator. Arg1 is the register in which to store the generator. Arg2 is the parent environment of the generator, or undefined. Arg3 is index in the function table. |
|
| CreateInnerEnvironment | 51 | 51 | Reg8, Reg8, UInt32 (total size 6) Create a new inner environment, to store values captured by closures. Arg1 is the destination. Arg2 is the parent environment. Arg3 is the number of slots in the environment. |
||||||||||||||
| CreatePrivateName | 158 | 159 | Reg8, UInt32 (string_id) (total size 5) Create a new primitive symbol, taking in a string description as input. This is almost equivalent to the following JS, with the important distinction an object is not computed- just the raw SymbolID. Arg1 is the result. Arg2 is the string id for the symbol description. Arg1 = new Symbol(Arg2) |
||||||||||||||
| CreateRegExp | 117 | 119 | 120 | 120 | 120 | 120 | 120 | 125 | 125 | 130 | 130 | 132 | 132 | 142 | 165 | 166 | Reg8, UInt32 (string_id), UInt32 (string_id), UInt32 (total size 13) Create a regular expression. Arg1 is the result. Arg2 is the string index of the pattern. Arg3 is the string index of the flags. Arg4 is the regexp bytecode index in the regexp table. |
| CreateThis | 95 | 97 | 98 | 98 | 98 | 98 | 98 | 102 | 102 | 104 | 104 | 106 | 106 | 114 | Reg8, Reg8, Reg8 (total size 3) Allocate an empty, uninitialized object (immediately before a constructor). Arg1 is the destination register. Arg2 is the prototype to assign it. Arg3 is the constructor closure that will be used*. * To allow internal constructors to have special objects allocated. |
||
| CreateThisForNew | 134 | 134 | Reg8, Reg8, UInt8 (total size 3) Allocate an empty, uninitialized object to be used as the `this` parameter in a `new` expression. Some closures are responsible for making their own `this`, so in these cases this instruction will simply return undefined. Arg1 is the destination register. Arg2 is the constructor closure that will be invoked. Arg3 is a cache index used to speed up fetching the new target prototype property. |
||||||||||||||
| CreateThisForSuper | 135 | 135 | Reg8, Reg8, Reg8, UInt8 (total size 4) Allocate an empty, uninitialized object to be used as the `this` parameter in a `new` expression. Arg1 is the destination register. Arg2 is the constructor closure that will be invoked. Arg3 is the new.target. Arg4 is a cache index used to speed up fetching the new target prototype property. |
||||||||||||||
| CreateTopLevelEnvironment | 54 | 65 | 65 | Reg8, UInt32 (total size 5) Create a top level environment, without a parent. TODO: Consider removing this in favor of using CreateEnvironment by using a different scheme for encoding the top level environment. Arg1 is the destination. Arg2 is the size of the new environment. |
|||||||||||||
| Debugger | 89 | 89 | 90 | 90 | 90 | 90 | 90 | 93 | 93 | 95 | 95 | 97 | 97 | 109 | 125 | 125 | (total size 0) Implementation dependent debugger action. |
| DebuggerCheckBreak | 90 | 90 | 91 | (total size 0) Fast check for a debugger break request. |
|||||||||||||
| Dec | 38 | 38 | 38 | 38 | 39 | 47 | 47 | Reg8, Reg8 (total size 2) Arg1 = Arg2 - 1 (JS decrement, skips number check) |
|||||||||
| DeclareGlobalVar | 48 | 48 | 48 | 48 | 48 | 48 | 48 | 49 | 49 | 51 | 51 | 52 | 52 | 56 | 67 | 67 | UInt32 (string_id) (total size 4) Declare a global variable by string table index. The variable will be set to undefined. |
| DefineOwnById | 86 | 86 | Reg8, Reg8, UInt8, UInt16 (total size 5) Define an object own property by string index. Arg1[stringtable[Arg4]] = Arg2. Arg3 is a cache index. |
||||||||||||||
| DefineOwnByIdLong | 87 | 87 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Define an object own property by string index. Arg1[stringtable[Arg4]] = Arg2. Arg3 is a cache index. |
||||||||||||||
| DefineOwnByIndex | 88 | 88 | Reg8, Reg8, UInt8 (total size 3) Assign a value to a constant integer own property which will be created as enumerable. This is used (potentially in conjunction with NewArrayWithBuffer) for arr=[foo,bar] initializations. Arg1[Arg3] = Arg2; |
||||||||||||||
| DefineOwnByIndexL | 89 | 89 | Reg8, Reg8, UInt32 (total size 6) Assign a value to a constant integer own property which will be created as enumerable. This is used (potentially in conjunction with NewArrayWithBuffer) for arr=[foo,bar] initializations. Arg1[Arg3] = Arg2; |
||||||||||||||
| DefineOwnByVal | 92 | 92 | Reg8, Reg8, Reg8, UInt8 (total size 4) Set an own property identified by value. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the property name. Arg4 : bool -> enumerable. If true, the property is created as enumerable, non-enumerable otherwise. Arg1[Arg3] = Arg2; |
||||||||||||||
| DefineOwnGetterSetterByVal | 103 | 103 | Reg8, Reg8, Reg8, Reg8, UInt8 (total size 5) Add a getter and a setter for a property by value. Object.defineProperty(Arg1, Arg2, { get: Arg3, set: Arg4 }). Arg1 is the target object which will have a property defined. Arg2 is the property name Arg3 is the getter closure or undefined Arg4 is the setter closure or undefined Arg5 : boolean - if true, the property will be enumerable. |
||||||||||||||
| DefineOwnInDenseArray | 90 | 90 | Reg8, Reg8, UInt8 (total size 3) Define an own property in a dense JavaScript array at a specific index. Requires that the array is dense and that the ArrayStorage underlying it has a size which is greater than the arrayIndex operand. Arg1[Arg3] = Arg2; Arg1 is the dense array object where the property will be defined. Arg2 is the value to be stored. Arg3 is the array index where the property will be stored. NOTE: The "L" version only goes up to 16-bit array indices, because NewArray only takes UInt16 argument. |
||||||||||||||
| DefineOwnInDenseArrayL | 91 | 91 | Reg8, Reg8, UInt16 (total size 4) Define an own property in a dense JavaScript array at a specific index. Requires that the array is dense and that the ArrayStorage underlying it has a size which is greater than the arrayIndex operand. Arg1[Arg3] = Arg2; Arg1 is the dense array object where the property will be defined. Arg2 is the value to be stored. Arg3 is the array index where the property will be stored. NOTE: The "L" version only goes up to 16-bit array indices, because NewArray only takes UInt16 argument. |
||||||||||||||
| DelById | 66 | 66 | 66 | 66 | 66 | 66 | 66 | 67 | 67 | 69 | 69 | 71 | 71 | Reg8, Reg8, UInt16 (string_id) (total size 4) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||
| DelByIdLong | 67 | 67 | 67 | 67 | 67 | 67 | 67 | 68 | 68 | 70 | 70 | 72 | 72 | Reg8, Reg8, UInt32 (string_id) (total size 6) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||
| DelByIdLoose | 80 | Reg8, Reg8, UInt16 (string_id) (total size 4) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||||||||||||||
| DelByIdLooseLong | 82 | Reg8, Reg8, UInt32 (string_id) (total size 6) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||||||||||||||
| DelByIdStrict | 81 | Reg8, Reg8, UInt16 (string_id) (total size 4) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||||||||||||||
| DelByIdStrictLong | 83 | Reg8, Reg8, UInt32 (string_id) (total size 6) Delete a property by string table index. Arg1 = delete Arg2[stringtable[Arg3]] |
|||||||||||||||
| DelByVal | 70 | 70 | 70 | 70 | 70 | 70 | 70 | 71 | 71 | 73 | 73 | 75 | 75 | 99 | 99 | Reg8, Reg8, Reg8, UInt8 (total size 4) Delete a property by value (when the value is not known at compile time). Arg1 = delete Arg2[Arg3] Arg4 : Integer value set to 1 for strict mode semantics, 0 for loose. |
|
| DelByValLoose | 88 | Reg8, Reg8, Reg8 (total size 3) Delete a property by value (when the value is not known at compile time). Arg1 = delete Arg2[Arg3] |
|||||||||||||||
| DelByValStrict | 89 | Reg8, Reg8, Reg8 (total size 3) Delete a property by value (when the value is not known at compile time). Arg1 = delete Arg2[Arg3] |
|||||||||||||||
| DirectEval | 87 | 87 | 87 | 87 | 87 | 87 | 87 | 90 | 90 | 92 | 92 | 94 | 94 | 106 | 120 | 120 | Reg8, Reg8, UInt8 (total size 3) ES6 18.2.1.1 PerformEval(Arg2, evalRealm, strictCaller=true, direct=true) Arg1 is the destination of the return value. Arg2 is the eval text Arg3 is a bool indicating strictCaller |
| Div | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 26 | 26 | 26 | 26 | 26 | 26 | 27 | 35 | 35 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 / Arg3 (JS division) |
| DivN | 26 | 26 | 26 | 26 | 26 | 26 | 26 | 27 | 27 | 27 | 27 | 27 | 27 | 28 | 36 | 36 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 / Arg3 (Numeric division, skips number check) |
| Divi32 | 188 | 193 | 193 | 195 | 195 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 / Arg3 (32-bit signed integer division) |
|||||||||||
| Divu32 | 189 | 194 | 194 | 196 | 196 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 / Arg3 (32-bit unsigned integer division) |
|||||||||||
| Eq | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 14 | 14 | 14 | 14 | 14 | 14 | 14 | 22 | 22 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 == Arg3 (JS equality) |
| FastArrayAppend | 14 | 15 | Reg8, Reg8 (total size 2) Append a FastArray onto another FastArray. Arg1.append(Arg2) |
||||||||||||||
| FastArrayLength | 10 | 11 | Reg8, Reg8 (total size 2) Get the length of a FastArray. Arg1 = Arg2.length |
||||||||||||||
| FastArrayLoad | 11 | 12 | Reg8, Reg8, Reg8 (total size 3) Load from a FastArray. Arg1 = Arg2[Arg3] |
||||||||||||||
| FastArrayPush | 13 | 14 | Reg8, Reg8 (total size 2) Push an element onto the end of a FastArray. Arg1.push(Arg2) |
||||||||||||||
| FastArrayStore | 12 | 13 | Reg8, Reg8, Reg8 (total size 3) Store to a FastArray. Arg1[Arg2] = Arg3 |
||||||||||||||
| GetArgumentsLength | 115 | 117 | 118 | 118 | 118 | 118 | 118 | 123 | 123 | 128 | 128 | 130 | 130 | 139 | 161 | 162 | Reg8, Reg8 (total size 2) Get the length of the 'arguments' array. Arg1 is the result. Arg2 is the lazy loaded register. Arg1 = arguments.length |
| GetArgumentsPropByVal | 114 | 116 | 117 | 117 | 117 | 117 | 117 | 122 | 122 | 127 | 127 | 129 | 129 | Reg8, Reg8, Reg8 (total size 3) Get a property of the 'arguments' array by value. Arg1 is the result. Arg2 is the index. Arg3 is the lazy loaded register. Arg1 = arguments[Arg2] |
|||
| GetArgumentsPropByValLoose | 137 | 159 | 160 | Reg8, Reg8, Reg8 (total size 3) Get a property of the 'arguments' array by value. Arg1 is the result. Arg2 is the index. Arg3 is the lazy loaded register. Arg1 = arguments[Arg2] |
|||||||||||||
| GetArgumentsPropByValStrict | 138 | 160 | 161 | Reg8, Reg8, Reg8 (total size 3) Get a property of the 'arguments' array by value. Arg1 is the result. Arg2 is the index. Arg3 is the lazy loaded register. Arg1 = arguments[Arg2] |
|||||||||||||
| GetBuiltinClosure | 87 | 87 | 89 | 89 | 91 | 91 | 103 | 117 | 117 | Reg8, UInt8 (total size 2) Get a closure from a builtin function. Arg1 is the destination of the return value. Arg2 is the builtin number. |
|||||||
| GetById | 50 | 50 | 50 | 50 | 50 | 50 | 50 | 51 | 51 | 53 | 53 | 55 | 55 | 58 | 69 | 69 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Get an object property by string table index. Arg1 = Arg2[stringtable[Arg4]] Arg3 is a cache index used to speed up the above operation. |
| GetByIdLong | 51 | 51 | 51 | 51 | 51 | 51 | 51 | 52 | 52 | 54 | 54 | 56 | 56 | 59 | 70 | 70 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Get an object property by string table index. Arg1 = Arg2[stringtable[Arg4]] Arg3 is a cache index used to speed up the above operation. |
| GetByIdShort | 49 | 49 | 49 | 49 | 49 | 49 | 49 | 50 | 50 | 52 | 52 | 54 | 54 | 57 | 68 | 68 | Reg8, Reg8, UInt8, UInt8 (string_id) (total size 4) Get an object property by string table index. Arg1 = Arg2[stringtable[Arg4]] Arg3 is a cache index used to speed up the above operation. |
| GetByIdWithReceiverLong | 71 | 71 | Reg8, Reg8, UInt8, Reg8, UInt32 (string_id) (total size 8) Get an object property by string table index, with a specified receiver. Arg1 = Arg2[stringtable[Arg5]] Arg1 is the destination. Arg2 is the object to begin the property look up. Arg3 is a cache index used to speed up the above operation. Arg4 is receiver. Arg5 is the string id. |
||||||||||||||
| GetByIndex | 85 | 94 | 94 | Reg8, Reg8, UInt8 (total size 3) Get a property by value, for the special case where the property is a numeric literal that is a uint8_t integer. Arg1 = Arg2[Arg3] |
|||||||||||||
| GetByVal | 68 | 68 | 68 | 68 | 68 | 68 | 68 | 69 | 69 | 71 | 71 | 73 | 73 | 84 | 93 | 93 | Reg8, Reg8, Reg8 (total size 3) Get a property by value. Constants string values should instead use GetById. Arg1 = Arg2[Arg3] |
| GetByValWithReceiver | 95 | 95 | Reg8, Reg8, Reg8, Reg8 (total size 4) Get a property by value with a specified receiver. Arg1 = Arg2[Arg3] Arg1 is the destination register. Arg2 is the object to begin the property look up. It must be an object. Arg3 is the property key. Arg4 is the receiver. |
||||||||||||||
| GetClosureEnvironment | 44 | 54 | 54 | Reg8, Reg8 (total size 2) Get the environment from a closure. Arg1 is the destination. Arg2 is the closure from which to read. |
|||||||||||||
| GetEnvironment | 38 | 38 | 38 | 38 | 38 | 38 | 38 | 39 | 39 | 41 | 41 | 41 | 41 | 43 | 53 | 53 | Reg8, Reg8, UInt8 (total size 3) Get an environment by traversing the scope chain. Arg1 is the destination. Arg2 is the environment from which to start traversing. Arg3 is the number of levels up the scope chain to go. |
| GetGlobalObject | 45 | 45 | 45 | 45 | 45 | 45 | 45 | 46 | 46 | 48 | 48 | 48 | 48 | 51 | 61 | 61 | Reg8 (total size 1) Get the global object (the object in which global variables are stored). |
| GetNewTarget | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 47 | 47 | 49 | 49 | 49 | 49 | 52 | 62 | 62 | Reg8 (total size 1) Obtain the value of NewTarget from the frame. Arg1 = NewTarget |
| GetNextPName | 73 | 73 | 73 | 73 | 73 | 73 | 73 | 74 | 74 | 76 | 76 | 78 | 78 | 92 | 105 | 105 | Reg8, Reg8, Reg8, Reg8, Reg8 (total size 5) Get the next property in the for..in iterator. Returns Arg1, which is the next property. Undefined if unavailable. Arg2 is the register that holds array of properties. Arg3 is the register that holds the object. Arg4 is the register that holds the iterating index. Arg5 is the register that holds the size of the property list. |
| GetOwnBySlotIdx | 84 | 84 | Reg8, Reg8, UInt8 (total size 3) Get an existing own property at a given slot index. Arg1 is the result register. Arg2 is the object. Arg3 is the hidden class slot index. Arg2[Arg3] = Arg2; |
||||||||||||||
| GetOwnBySlotIdxLong | 85 | 85 | Reg8, Reg8, UInt32 (total size 6) Get an existing own property at a given slot index. Arg1 is the result register. Arg2 is the object. Arg3 is the hidden class slot index. Arg2[Arg3] = Arg2; |
||||||||||||||
| GetOwnPrivateBySym | 101 | 101 | Reg8, Reg8, UInt8, Reg8 (total size 4) Get a private property from an object. Arg1 = Arg2[Arg5] Arg1 is the result Arg2 is the object to read from. Arg3 is a private name cache index used to speed up the above operation. Arg4 is the symbol value of the private name. |
||||||||||||||
| GetPNameList | 72 | 72 | 72 | 72 | 72 | 72 | 72 | 73 | 73 | 75 | 75 | 77 | 77 | 91 | 104 | 104 | Reg8, Reg8, Reg8, Reg8 (total size 4) Get the list of properties from an object to implement for..in loop. Returns Arg1, which is the register that holds array of properties. Returns Undefined if the object is null/undefined. Arg2 is the register that holds the object. Arg3 is the register that holds the iterating index. Arg4 is the register that holds the size of the property list. |
| GetParentEnvironment | 42 | 52 | 52 | Reg8, UInt8 (total size 2) Get an environment (scope) from N levels up relative to the current function's enclosing environment. 0 retrieves the environment from the closure, 1 retrieves its parent, etc. |
|||||||||||||
| Greater | 19 | 19 | 19 | 19 | 19 | 19 | 19 | 20 | 20 | 20 | 20 | 20 | 20 | 20 | 28 | 28 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 > Arg3 (JS greater-than) |
| GreaterEq | 20 | 20 | 20 | 20 | 20 | 20 | 20 | 21 | 21 | 21 | 21 | 21 | 21 | 21 | 29 | 29 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 >= Arg3 (JS greater-than-or-equals) |
| Inc | 37 | 37 | 37 | 37 | 38 | 46 | 46 | Reg8, Reg8 (total size 2) Arg1 = Arg2 + 1 (JS increment, skips number check) |
|||||||||
| InstanceOf | 36 | 36 | 36 | 36 | 36 | 36 | 36 | 37 | 37 | 39 | 39 | 39 | 39 | 40 | 48 | 48 | Reg8, Reg8, Reg8 (total size 3) Check whether Arg2 contains Arg3 in its prototype chain. Note that this is not the same as JS instanceof. Pseudocode: Arg1 = prototypechain(Arg2).contains(Arg3) |
| IsIn | 37 | 37 | 37 | 37 | 37 | 37 | 37 | 38 | 38 | 40 | 40 | 40 | 40 | 41 | 49 | 49 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 in Arg3 (JS relational 'in') |
| IteratorBegin | 127 | 127 | 132 | 132 | 137 | 137 | 139 | 139 | 146 | 170 | 171 | Reg8, Reg8 (total size 2) Arg1 [out] is the result iterator or index. Arg2 [in/out] is the source. Output for either the source or next method. If source is an array with an unmodified [Symbol.iterator], the result is 0. Else the result is source[Symbol.iterator] and the output is the .next() method on the iterator. See IR.md for IteratorBeginInst. |
|||||
| IteratorClose | 129 | 129 | 134 | 134 | 139 | 139 | 141 | 141 | 148 | 172 | 173 | Reg8, UInt8 (total size 2) Arg1 [in] is the iterator or array index. Arg2 is a bool indicating whether to ignore the inner exception. If the iterator is an object, call iterator.return(). If Arg2 is true, ignore exceptions which are thrown by iterator.return(). See IR.md for IteratorCloseInst. |
|||||
| IteratorNext | 128 | 128 | 133 | 133 | 138 | 138 | 140 | 140 | 147 | 171 | 172 | Reg8, Reg8, Reg8 (total size 3) Arg1 [out] is the result, or undefined if done. Arg2 [in/out] is the iterator or index. Arg2 [in] is the source or the next method. If iterator is undefined, result = undefined. If iterator is a number: If iterator is less than source.length, return source[iterator++] Else iterator = undefined and result = undefined Else: n = iterator.next() If n.done, iterator = undefined and result = undefined. Else result = n.value See IR.md for IteratorNextInst. |
|||||
| JEqual | 159 | 168 | 169 | 169 | 169 | 172 | 172 | 177 | 177 | 182 | 182 | 184 | 184 | 189 | 207 | 208 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JEqualLong | 160 | 169 | 170 | 170 | 170 | 173 | 173 | 178 | 178 | 183 | 183 | 185 | 185 | 190 | 208 | 209 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JGreater | 143 | 152 | 153 | 153 | 153 | 156 | 156 | 161 | 161 | 166 | 166 | 168 | 168 | 173 | 199 | 200 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JGreaterEqual | 151 | 160 | 161 | 161 | 161 | 164 | 164 | 169 | 169 | 174 | 174 | 176 | 176 | 181 | 203 | 204 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JGreaterEqualLong | 152 | 161 | 162 | 162 | 162 | 165 | 165 | 170 | 170 | 175 | 175 | 177 | 177 | 182 | 204 | 205 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JGreaterEqualN | 155 | 164 | 165 | 165 | 165 | 168 | 168 | 173 | 173 | 178 | 178 | 180 | 180 | 185 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JGreaterEqualNLong | 156 | 165 | 166 | 166 | 166 | 169 | 169 | 174 | 174 | 179 | 179 | 181 | 181 | 186 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JGreaterLong | 144 | 153 | 154 | 154 | 154 | 157 | 157 | 162 | 162 | 167 | 167 | 169 | 169 | 174 | 200 | 201 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JGreaterN | 147 | 156 | 157 | 157 | 157 | 160 | 160 | 165 | 165 | 170 | 170 | 172 | 172 | 177 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JGreaterNLong | 148 | 157 | 158 | 158 | 158 | 161 | 161 | 166 | 166 | 171 | 171 | 173 | 173 | 178 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JLess | 127 | 136 | 137 | 137 | 137 | 140 | 140 | 145 | 145 | 150 | 150 | 152 | 152 | 157 | 183 | 184 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessEqual | 135 | 144 | 145 | 145 | 145 | 148 | 148 | 153 | 153 | 158 | 158 | 160 | 160 | 165 | 191 | 192 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessEqualLong | 136 | 145 | 146 | 146 | 146 | 149 | 149 | 154 | 154 | 159 | 159 | 161 | 161 | 166 | 192 | 193 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessEqualN | 139 | 148 | 149 | 149 | 149 | 152 | 152 | 157 | 157 | 162 | 162 | 164 | 164 | 169 | 195 | 196 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessEqualNLong | 140 | 149 | 150 | 150 | 150 | 153 | 153 | 158 | 158 | 163 | 163 | 165 | 165 | 170 | 196 | 197 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessLong | 128 | 137 | 138 | 138 | 138 | 141 | 141 | 146 | 146 | 151 | 151 | 153 | 153 | 158 | 184 | 185 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessN | 131 | 140 | 141 | 141 | 141 | 144 | 144 | 149 | 149 | 154 | 154 | 156 | 156 | 161 | 187 | 188 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JLessNLong | 132 | 141 | 142 | 142 | 142 | 145 | 145 | 150 | 150 | 155 | 155 | 157 | 157 | 162 | 188 | 189 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotEqual | 161 | 170 | 171 | 171 | 171 | 174 | 174 | 179 | 179 | 184 | 184 | 186 | 186 | 191 | 209 | 210 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotEqualLong | 162 | 171 | 172 | 172 | 172 | 175 | 175 | 180 | 180 | 185 | 185 | 187 | 187 | 192 | 210 | 211 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotGreater | 145 | 154 | 155 | 155 | 155 | 158 | 158 | 163 | 163 | 168 | 168 | 170 | 170 | 175 | 201 | 202 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotGreaterEqual | 153 | 162 | 163 | 163 | 163 | 166 | 166 | 171 | 171 | 176 | 176 | 178 | 178 | 183 | 205 | 206 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotGreaterEqualLong | 154 | 163 | 164 | 164 | 164 | 167 | 167 | 172 | 172 | 177 | 177 | 179 | 179 | 184 | 206 | 207 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotGreaterEqualN | 157 | 166 | 167 | 167 | 167 | 170 | 170 | 175 | 175 | 180 | 180 | 182 | 182 | 187 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JNotGreaterEqualNLong | 158 | 167 | 168 | 168 | 168 | 171 | 171 | 176 | 176 | 181 | 181 | 183 | 183 | 188 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JNotGreaterLong | 146 | 155 | 156 | 156 | 156 | 159 | 159 | 164 | 164 | 169 | 169 | 171 | 171 | 176 | 202 | 203 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotGreaterN | 149 | 158 | 159 | 159 | 159 | 162 | 162 | 167 | 167 | 172 | 172 | 174 | 174 | 179 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JNotGreaterNLong | 150 | 159 | 160 | 160 | 160 | 163 | 163 | 168 | 168 | 173 | 173 | 175 | 175 | 180 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
||
| JNotLess | 129 | 138 | 139 | 139 | 139 | 142 | 142 | 147 | 147 | 152 | 152 | 154 | 154 | 159 | 185 | 186 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessEqual | 137 | 146 | 147 | 147 | 147 | 150 | 150 | 155 | 155 | 160 | 160 | 162 | 162 | 167 | 193 | 194 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessEqualLong | 138 | 147 | 148 | 148 | 148 | 151 | 151 | 156 | 156 | 161 | 161 | 163 | 163 | 168 | 194 | 195 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessEqualN | 141 | 150 | 151 | 151 | 151 | 154 | 154 | 159 | 159 | 164 | 164 | 166 | 166 | 171 | 197 | 198 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessEqualNLong | 142 | 151 | 152 | 152 | 152 | 155 | 155 | 160 | 160 | 165 | 165 | 167 | 167 | 172 | 198 | 199 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessLong | 130 | 139 | 140 | 140 | 140 | 143 | 143 | 148 | 148 | 153 | 153 | 155 | 155 | 160 | 186 | 187 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessN | 133 | 142 | 143 | 143 | 143 | 146 | 146 | 151 | 151 | 156 | 156 | 158 | 158 | 163 | 189 | 190 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JNotLessNLong | 134 | 143 | 144 | 144 | 144 | 147 | 147 | 152 | 152 | 157 | 157 | 159 | 159 | 164 | 190 | 191 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JStrictEqual | 163 | 172 | 173 | 173 | 173 | 176 | 176 | 181 | 181 | 186 | 186 | 188 | 188 | 193 | 211 | 212 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JStrictEqualLong | 164 | 173 | 174 | 174 | 174 | 177 | 177 | 182 | 182 | 187 | 187 | 189 | 189 | 194 | 212 | 213 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JStrictNotEqual | 165 | 174 | 175 | 175 | 175 | 178 | 178 | 183 | 183 | 188 | 188 | 190 | 190 | 195 | 213 | 214 | Addr8, Reg8, Reg8 (total size 3) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| JStrictNotEqualLong | 166 | 175 | 176 | 176 | 176 | 179 | 179 | 184 | 184 | 189 | 189 | 191 | 191 | 196 | 214 | 215 | Addr32, Reg8, Reg8 (total size 6) Not conditionals are required for NaN comparisons Since we want to be able to reorder targets to allow for fall-throughs, we need to be able to say "jump when not less than to BB2" instead of "jump when less than to BB1". Since NaN comparisons always return false, "not less" != "greater or equal" |
| Jmp | 119 | 126 | 127 | 127 | 127 | 130 | 130 | 135 | 135 | 140 | 140 | 142 | 142 | 149 | 174 | 175 | Addr8 (total size 1) Unconditional branch to Arg1. |
| JmpBuiltinIs | 215 | 216 | Addr8, UInt8, Reg8 (total size 3) | ||||||||||||||
| JmpBuiltinIsLong | 216 | 217 | Addr32, UInt8, Reg8 (total size 6) | ||||||||||||||
| JmpBuiltinIsNot | 217 | 218 | Addr8, UInt8, Reg8 (total size 3) | ||||||||||||||
| JmpBuiltinIsNotLong | 218 | 219 | Addr32, UInt8, Reg8 (total size 6) | ||||||||||||||
| JmpFalse | 123 | 130 | 131 | 131 | 131 | 134 | 134 | 139 | 139 | 144 | 144 | 146 | 146 | 153 | 178 | 179 | Addr8, Reg8 (total size 2) Conditional branches to Arg1 based on Arg2. |
| JmpFalseLong | 124 | 131 | 132 | 132 | 132 | 135 | 135 | 140 | 140 | 145 | 145 | 147 | 147 | 154 | 179 | 180 | Addr32, Reg8 (total size 5) Conditional branches to Arg1 based on Arg2. |
| JmpLong | 120 | 127 | 128 | 128 | 128 | 131 | 131 | 136 | 136 | 141 | 141 | 143 | 143 | 150 | 175 | 176 | Addr32 (total size 4) Unconditional branch to Arg1. |
| JmpTrue | 121 | 128 | 129 | 129 | 129 | 132 | 132 | 137 | 137 | 142 | 142 | 144 | 144 | 151 | 176 | 177 | Addr8, Reg8 (total size 2) Conditional branches to Arg1 based on Arg2. |
| JmpTrueLong | 122 | 129 | 130 | 130 | 130 | 133 | 133 | 138 | 138 | 143 | 143 | 145 | 145 | 152 | 177 | 178 | Addr32, Reg8 (total size 5) Conditional branches to Arg1 based on Arg2. |
| JmpTypeOfIs | 182 | 183 | Addr32, Reg8, UInt16 (total size 7) Jump if the type matches the TypeOfIsTypes in Arg3. Arg1 is the target. Arg2 is the value to test. Arg3 is the TypeOfIsTypes (see Typeof.h). |
||||||||||||||
| JmpUndefined | 125 | 132 | 133 | 133 | 133 | 136 | 136 | 141 | 141 | 146 | 146 | 148 | 148 | 155 | 180 | 181 | Addr8, Reg8 (total size 2) Jump if the value is undefined. |
| JmpUndefinedLong | 126 | 133 | 134 | 134 | 134 | 137 | 137 | 142 | 142 | 147 | 147 | 149 | 149 | 156 | 181 | 182 | Addr32, Reg8 (total size 5) Jump if the value is undefined. |
| LShift | 30 | 30 | 30 | 30 | 30 | 30 | 30 | 31 | 31 | 31 | 31 | 31 | 31 | 32 | 40 | 40 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 << Arg3 (JS bitshift left) |
| Less | 17 | 17 | 17 | 17 | 17 | 17 | 17 | 18 | 18 | 18 | 18 | 18 | 18 | 18 | 26 | 26 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 < Arg3 (JS less-than) |
| LessEq | 18 | 18 | 18 | 18 | 18 | 18 | 18 | 19 | 19 | 19 | 19 | 19 | 19 | 19 | 27 | 27 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 <= Arg3 (JS less-than-or-equals) |
| LoadConstBigInt | 111 | 111 | 113 | 113 | 121 | 142 | 142 | Reg8, UInt16 (bigint_id) (total size 3) Load a constant BigInt value by bigint table index. |
|||||||||
| LoadConstBigIntLongIndex | 112 | 112 | 114 | 114 | 122 | 143 | 143 | Reg8, UInt32 (bigint_id) (total size 5) Load a constant BigInt value by bigint table index. |
|||||||||
| LoadConstDouble | 101 | 103 | 104 | 104 | 104 | 104 | 104 | 108 | 108 | 110 | 110 | 112 | 112 | 120 | 141 | 141 | Reg8, Double (total size 9) Load a constant double value. |
| LoadConstEmpty | 111 | 111 | 115 | 115 | 117 | 117 | 125 | 146 | 146 | Reg8 (total size 1) Load common constants. |
|||||||
| LoadConstFalse | 107 | 109 | 110 | 110 | 110 | 110 | 110 | 115 | 115 | 119 | 119 | 121 | 121 | 129 | 150 | 150 | Reg8 (total size 1) Load common constants. |
| LoadConstInt | 100 | 102 | 103 | 103 | 103 | 103 | 103 | 107 | 107 | 109 | 109 | 111 | 111 | 119 | 140 | 140 | Reg8, Imm32 (total size 5) Load a constant integer value. |
| LoadConstNull | 105 | 107 | 108 | 108 | 108 | 108 | 108 | 113 | 113 | 117 | 117 | 119 | 119 | 127 | 148 | 148 | Reg8 (total size 1) Load common constants. |
| LoadConstString | 102 | 104 | 105 | 105 | 105 | 105 | 105 | 109 | 109 | 113 | 113 | 115 | 115 | 123 | 144 | 144 | Reg8, UInt16 (string_id) (total size 3) Load a constant string value by string table index. |
| LoadConstStringLongIndex | 103 | 105 | 106 | 106 | 106 | 106 | 106 | 110 | 110 | 114 | 114 | 116 | 116 | 124 | 145 | 145 | Reg8, UInt32 (string_id) (total size 5) Load a constant string value by string table index. |
| LoadConstTrue | 106 | 108 | 109 | 109 | 109 | 109 | 109 | 114 | 114 | 118 | 118 | 120 | 120 | 128 | 149 | 149 | Reg8 (total size 1) Load common constants. |
| LoadConstUInt8 | 99 | 101 | 102 | 102 | 102 | 102 | 102 | 106 | 106 | 108 | 108 | 110 | 110 | 118 | 139 | 139 | Reg8, UInt8 (total size 2) Load a constant integer value. |
| LoadConstUndefined | 104 | 106 | 107 | 107 | 107 | 107 | 107 | 112 | 112 | 116 | 116 | 118 | 118 | 126 | 147 | 147 | Reg8 (total size 1) Load common constants. |
| LoadConstZero | 108 | 110 | 111 | 111 | 111 | 111 | 111 | 116 | 116 | 120 | 120 | 122 | 122 | 130 | 151 | 151 | Reg8 (total size 1) Load common constants. |
| LoadFromEnvironment | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 44 | 44 | 46 | 46 | 46 | 46 | 49 | 59 | 59 | Reg8, Reg8, UInt8 (total size 3) Load a value from an environment. Arg1 is the destination. Arg2 is the environment (as fetched by GetEnvironment). Arg3 is the environment index slot number. |
| LoadFromEnvironmentL | 44 | 44 | 44 | 44 | 44 | 44 | 44 | 45 | 45 | 47 | 47 | 47 | 47 | 50 | 60 | 60 | Reg8, Reg8, UInt16 (total size 4) Load a value from an environment. Arg1 is the destination. Arg2 is the environment (as fetched by GetEnvironment). Arg3 is the environment index slot number. |
| LoadParam | 97 | 99 | 100 | 100 | 100 | 100 | 100 | 104 | 104 | 106 | 106 | 108 | 108 | 116 | 137 | 137 | Reg8, UInt8 (total size 2) Load a function parameter by index. Starts at 0 with 'this'. Arg1 = Arg2 == 0 ? this : arguments[Arg2 - 1]; |
| LoadParamLong | 98 | 100 | 101 | 101 | 101 | 101 | 101 | 105 | 105 | 107 | 107 | 109 | 109 | 117 | 138 | 138 | Reg8, UInt32 (total size 5) Like LoadParam, but allows accessing arguments >= 255. |
| LoadParentNoTraps | 63 | 63 | Reg8, Reg8 (total size 2) Get the parent of a given object. The parent will either be an object or null. Arg1 = destination register to write the parent. Arg2 = the object. |
||||||||||||||
| LoadThisNS | 110 | 112 | 113 | 113 | 113 | 113 | 113 | 118 | 118 | 122 | 122 | 124 | 124 | 132 | 153 | 153 | Reg8 (total size 1) Obtain the raw \c this value and coerce it to an object. Equivalent to: \code LoadParam Arg1, #0 CoerceThisNS Arg1, Arg1 \endcode |
| Loadi16 | 192 | 197 | 197 | 199 | 199 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAP16[Arg3 >> 1] (load signed 16-bit integer) |
|||||||||||
| Loadi32 | 194 | 199 | 199 | 201 | 201 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAP32[Arg3 >> 2] (load signed 32-bit integer) |
|||||||||||
| Loadi8 | 190 | 195 | 195 | 197 | 197 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAP8[Arg3] (load signed 8-bit integer) |
|||||||||||
| Loadu16 | 193 | 198 | 198 | 200 | 200 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAPU16[Arg3 >> 1] (load unsigned 16-bit integer) |
|||||||||||
| Loadu32 | 195 | 200 | 200 | 202 | 202 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAPU32[Arg3 >> 2] (load unsigned 32-bit integer) |
|||||||||||
| Loadu8 | 191 | 196 | 196 | 198 | 198 | Reg8, Reg8, Reg8 (total size 3) Arg1 = HEAPU8[Arg3] (load unsigned 8-bit integer) |
|||||||||||
| Mod | 27 | 27 | 27 | 27 | 27 | 27 | 27 | 28 | 28 | 28 | 28 | 28 | 28 | 29 | 37 | 37 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 % Arg3 (JS remainder) |
| Mov | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 16 | 16 | Reg8, Reg8 (total size 2) Arg1 = Arg2 (Register copy) |
| MovLong | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 17 | 17 | Reg32, Reg32 (total size 8) Arg1 = Arg2 (Register copy, long index) |
| Mul | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 24 | 24 | 24 | 24 | 24 | 24 | 25 | 33 | 33 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 * Arg3 (JS multiplication) |
| Mul32 | 187 | 192 | 192 | 194 | 194 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 * Arg3 (32-bit integer multiplication) |
|||||||||||
| MulN | 24 | 24 | 24 | 24 | 24 | 24 | 24 | 25 | 25 | 25 | 25 | 25 | 25 | 26 | 34 | 34 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 * Arg3 (Numeric multiplication, skips number check) |
| Negate | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 18 | 18 | Reg8, Reg8 (total size 2) Arg1 = -Arg2 (Unary minus) |
| Neq | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 16 | 16 | 16 | 16 | 16 | 16 | 16 | 24 | 24 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 != Arg3 (JS inequality) |
| NewArray | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 8 | 9 | Reg8, UInt16 (total size 3) Create a new array of a given size. Arg1 = new Array(Arg2) |
| NewArrayWithBuffer | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 6 | 7 | Reg8, UInt16, UInt16, UInt16 (total size 7) Create an array from a static list of values, as for var=[1,2,3]. Any non-constant elements can be set afterwards with DefineOwnByIndex. Arg1 is the destination. Arg2 is a preallocation size hint. Arg3 is the number of static elements. Arg4 is the offset in the array buffer table. |
| NewArrayWithBufferLong | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 7 | 8 | Reg8, UInt16, UInt16, UInt32 (total size 9) Create an array from a static list of values, as for var=[1,2,3]. Any non-constant elements can be set afterwards with DefineOwnByIndex. Arg1 is the destination. Arg2 is a preallocation size hint. Arg3 is the number of static elements. Arg4 is the offset in the array buffer table. |
| NewFastArray | 9 | 10 | Reg8, UInt16 (total size 3) Create a new FastArray. Arg1 = new FastArray(Arg2) |
||||||||||||||
| NewObject | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 4 | 5 | Reg8 (total size 1) Create a new, empty Object using the built-in constructor (regardless of whether it was overridden). Arg1 = {} |
| NewObjectWithBuffer | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | Reg8, UInt16, UInt16 (total size 5) Create an object from a static map of values, as for var={'a': 3}. Any non-constant elements can be set afterwards with PutOwnByInd. Arg1 is the destination. Arg2 is the index in the object shape table. Arg3 is the offset in the object val buffer table. |
| NewObjectWithBufferAndParent | 3 | 3 | Reg8, Reg8, UInt32, UInt32 (total size 10) Create an object from a static map of values, setting its parent. Arg1 is the destination. Arg2 is the parent. Arg3 is the index in the object shape table. Arg4 is the offset in the object val buffer table. |
||||||||||||||
| NewObjectWithBufferLong | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | Reg8, UInt32, UInt32 (total size 9) Create an object from a static map of values, as for var={'a': 3}. Any non-constant elements can be set afterwards with PutOwnByInd. Arg1 is the destination. Arg2 is the index in the object shape table. Arg3 is the offset in the object val buffer table. |
| NewObjectWithParent | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 5 | 6 | Reg8, Reg8 (total size 2) Create a new empty Object with the specified parent. If the parent is null, no parent is used. If the parent is not an object, the builtin Object.prototype is used. Otherwise the parent itself is used. Arg1 = the created object Arg2 = the parent. |
| NewTypedObjectWithBuffer | 4 | Reg8, Reg8, UInt32, UInt32, UInt8 (total size 11) Create a typed object from a static map of values, for typed classes. The result will have properties which are readonly from legacy JS, only mutable via PutOwnBySlotIdx, and some which may be private (only visible to GetOwnBySlotIdx via typed code). Arg1 is the destination. Arg2 is the parent. Arg3 is the index in the object shape table. Arg4 is the index in the object val buffer table. Arg5 is non-zero if properties should be non-enumerable. |
|||||||||||||||
| Not | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 19 | 19 | Reg8, Reg8 (total size 2) Arg1 = !Arg2 (Boolean not) |
| PrivateIsIn | 50 | 50 | Reg8, Reg8, Reg8, Reg8 (total size 4) Arg1 = Arg2 in Arg3 (JS relational 'in' for private names.) Arg2 must be a symbol. Arg4 is a private name cache index used to speed up the above operation. Note that this performs different logic than a normal `in` check. This instruction does not consult the prototype chain or trigger any proxy traps. It is a direct check on the own properties of the input object. |
||||||||||||||
| ProfilePoint | 91 | 91 | 92 | 92 | 92 | 92 | 92 | 95 | 95 | 97 | 97 | 99 | 99 | 111 | 127 | 127 | UInt16 (total size 2) Define a profile point. Arg1 is the function local profile point index. The first one will have the largest index. If there are more than 2^16 profile points in the function, all the overflowed profile points have index zero. |
| PutById | 54 | 54 | 54 | 54 | 54 | 54 | 54 | 55 | 55 | 57 | 57 | 59 | 59 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||
| PutByIdLong | 55 | 55 | 55 | 55 | 55 | 55 | 55 | 56 | 56 | 58 | 58 | 60 | 60 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||
| PutByIdLoose | 62 | 74 | 74 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||||||||||||
| PutByIdLooseLong | 64 | 76 | 76 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||||||||||||
| PutByIdStrict | 63 | 75 | 75 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||||||||||||
| PutByIdStrictLong | 65 | 77 | 77 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index. Arg1[stringtable[Arg4]] = Arg2. |
|||||||||||||
| PutByVal | 69 | 69 | 69 | 69 | 69 | 69 | 69 | 70 | 70 | 72 | 72 | 74 | 74 | Reg8, Reg8, Reg8 (total size 3) Set a property by value. Constant string values should instead use GetById (unless they are array indices according to ES5.1 section 15.4, in which case this is still the right opcode). Arg1[Arg2] = Arg3 |
|||
| PutByValLoose | 86 | 96 | 96 | Reg8, Reg8, Reg8 (total size 3) Set a property by value. Constant string values should instead use GetById (unless they are array indices according to ES5.1 section 15.4, in which case this is still the right opcode). Arg1[Arg2] = Arg3 |
|||||||||||||
| PutByValStrict | 87 | 97 | 97 | Reg8, Reg8, Reg8 (total size 3) Set a property by value. Constant string values should instead use GetById (unless they are array indices according to ES5.1 section 15.4, in which case this is still the right opcode). Arg1[Arg2] = Arg3 |
|||||||||||||
| PutByValWithReceiver | 98 | 98 | Reg8, Reg8, Reg8, Reg8, UInt8 (total size 5) Set a property by value, with a specified receiver. Arg1[Arg2] = Arg3 Arg4 is the receiver Arg5 is true if this operation is strict, false for loose. |
||||||||||||||
| PutNewOwnById | 59 | 59 | 59 | 59 | 59 | 59 | 59 | 60 | 60 | 62 | 62 | 64 | 64 | 71 | Reg8, Reg8, UInt16 (string_id) (total size 4) Create a new own property on an object. This is similar to PutById, but the destination must be an object, it only deals with own properties, ignoring the prototype chain, and the property must not already be defined. Similarly to PutById, the property name cannot be a valid array index. Arg1 is the destination object, which is known to be an object. Arg2 is the value to write. Arg3 is the string table ID of the property name. Arg1[stringtable[Arg3]] = Arg2 |
||
| PutNewOwnByIdLong | 60 | 60 | 60 | 60 | 60 | 60 | 60 | 61 | 61 | 63 | 63 | 65 | 65 | 72 | Reg8, Reg8, UInt32 (string_id) (total size 6) Create a new own property on an object. This is similar to PutById, but the destination must be an object, it only deals with own properties, ignoring the prototype chain, and the property must not already be defined. Similarly to PutById, the property name cannot be a valid array index. Arg1 is the destination object, which is known to be an object. Arg2 is the value to write. Arg3 is the string table ID of the property name. Arg1[stringtable[Arg3]] = Arg2 |
||
| PutNewOwnByIdShort | 58 | 58 | 58 | 58 | 58 | 58 | 58 | 59 | 59 | 61 | 61 | 63 | 63 | 70 | Reg8, Reg8, UInt8 (string_id) (total size 3) Create a new own property on an object. This is similar to PutById, but the destination must be an object, it only deals with own properties, ignoring the prototype chain, and the property must not already be defined. Similarly to PutById, the property name cannot be a valid array index. Arg1 is the destination object, which is known to be an object. Arg2 is the value to write. Arg3 is the string table ID of the property name. Arg1[stringtable[Arg3]] = Arg2 |
||
| PutNewOwnNEById | 61 | 61 | 61 | 61 | 61 | 61 | 61 | 62 | 62 | 64 | 64 | 66 | 66 | 75 | Reg8, Reg8, UInt16 (string_id) (total size 4) Create a new non-enumerable own property on an object. This is the same as PutNewOwnById, but creates the property with different enumerability. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the string table ID of the property name. Arg1[stringtable[Arg3]] = Arg2 |
||
| PutNewOwnNEByIdLong | 62 | 62 | 62 | 62 | 62 | 62 | 62 | 63 | 63 | 65 | 65 | 67 | 67 | 76 | Reg8, Reg8, UInt32 (string_id) (total size 6) Create a new non-enumerable own property on an object. This is the same as PutNewOwnById, but creates the property with different enumerability. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the string table ID of the property name. Arg1[stringtable[Arg3]] = Arg2 |
||
| PutOwnByIndex | 63 | 63 | 63 | 63 | 63 | 63 | 63 | 64 | 64 | 66 | 66 | 68 | 68 | 77 | Reg8, Reg8, UInt8 (total size 3) Assign a value to a constant integer own property which will be created as enumerable. This is used (potentially in conjunction with NewArrayWithBuffer) for arr=[foo,bar] initializations. Arg1[Arg3] = Arg2; |
||
| PutOwnByIndexL | 64 | 64 | 64 | 64 | 64 | 64 | 64 | 65 | 65 | 67 | 67 | 69 | 69 | 78 | Reg8, Reg8, UInt32 (total size 6) Assign a value to a constant integer own property which will be created as enumerable. This is used (potentially in conjunction with NewArrayWithBuffer) for arr=[foo,bar] initializations. Arg1[Arg3] = Arg2; |
||
| PutOwnBySlotIdx | 73 | 82 | 82 | Reg8, Reg8, UInt8 (total size 3) Set an existing own property identified at a slot index. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the hidden class slot index. Arg1[Arg3] = Arg2; |
|||||||||||||
| PutOwnBySlotIdxLong | 74 | 83 | 83 | Reg8, Reg8, UInt32 (total size 6) Set an existing own property identified at a slot index. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the hidden class slot index. Arg1[Arg3] = Arg2; |
|||||||||||||
| PutOwnByVal | 65 | 65 | 65 | 65 | 65 | 65 | 65 | 66 | 66 | 68 | 68 | 70 | 70 | 79 | Reg8, Reg8, Reg8, UInt8 (total size 4) Set an own property identified by value. Arg1 is the destination object. Arg2 is the value to write. Arg3 is the property name. Arg4 : bool -> enumerable. If true, the property is created as enumerable, non-enumerable otherwise. Arg1[Arg3] = Arg2; |
||
| PutOwnGetterSetterByVal | 71 | 71 | 71 | 71 | 71 | 71 | 71 | 72 | 72 | 74 | 74 | 76 | 76 | 90 | Reg8, Reg8, Reg8, Reg8, UInt8 (total size 5) Add a getter and a setter for a property by value. Object.defineProperty(Arg1, Arg2, { get: Arg3, set: Arg4 }). Arg1 is the target object which will have a property defined. Arg2 is the property name Arg3 is the getter closure or undefined Arg4 is the setter closure or undefined Arg5 : boolean - if true, the property will be enumerable. |
||
| PutOwnPrivateBySym | 102 | 102 | Reg8, Reg8, UInt8, Reg8 (total size 4) Store a private property to an object. Arg1[Arg5] = Arg2 Arg1 is the object to store to. Arg2 is the value to store. Arg3 is a private name cache index used to speed up the above operation. Arg4 is the symbol value of the private name. |
||||||||||||||
| RShift | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 32 | 32 | 32 | 32 | 32 | 32 | 33 | 41 | 41 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 >> Arg3 (JS signed bitshift right) |
| ReifyArguments | 116 | 118 | 119 | 119 | 119 | 119 | 119 | 124 | 124 | 129 | 129 | 131 | 131 | Reg8 (total size 1) Create an actual 'arguments' array, if get-by-index and length isn't enough. Arg1 is the lazy loaded register, which afterwards will contain a proper object that can be used by non-*Arguments* opcodes like Return. |
|||
| ReifyArgumentsLoose | 141 | 163 | 164 | Reg8 (total size 1) Create an actual 'arguments' array, if get-by-index and length isn't enough. Arg1 is the lazy loaded register, which afterwards will contain a proper object that can be used by non-*Arguments* opcodes like Return. |
|||||||||||||
| ReifyArgumentsStrict | 140 | 162 | 163 | Reg8 (total size 1) Create an actual 'arguments' array, if get-by-index and length isn't enough. Arg1 is the lazy loaded register, which afterwards will contain a proper object that can be used by non-*Arguments* opcodes like Return. |
|||||||||||||
| ResumeGenerator | 122 | 123 | 123 | 123 | 123 | 123 | 128 | 128 | 133 | 133 | 135 | 135 | Reg8, Reg8 (total size 2) Resume generator by performing one of the following user-requested actions: - next(val): Set Arg1 to val, Arg2 to false, run next instruction - return(val): Set Arg1 to val, Arg2 to true, run next instruction - throw(val): Throw val as an error Arg1 is the result provided by the user. Arg2 is a boolean which is true if the user requested a return(). |
||||
| Ret | 85 | 85 | 85 | 85 | 85 | 85 | 85 | 88 | 88 | 90 | 90 | 92 | 92 | 104 | 118 | 118 | Reg8 (total size 1) Return a value from the current function. return Arg1; |
| SaveGenerator | 134 | 135 | 135 | 135 | 138 | 138 | 143 | 143 | 148 | 148 | 150 | 150 | Addr8 (total size 1) Save the provided value, yield, and signal the VM to restart execution at the provided target. |
||||
| SaveGeneratorLong | 135 | 136 | 136 | 136 | 139 | 139 | 144 | 144 | 149 | 149 | 151 | 151 | Addr32 (total size 4) Save the provided value, yield, and signal the VM to restart execution at the provided target. |
||||
| SelectObject | 96 | 98 | 99 | 99 | 99 | 99 | 99 | 103 | 103 | 105 | 105 | 107 | 107 | 115 | 136 | 136 | Reg8, Reg8, Reg8 (total size 3) Choose the result of a constructor: 'this' or a returned object. Arg1 is the result. Arg2 is the 'this' object used for the constructor. Arg3 is the constructor's return value. Arg1 = Arg3 instanceof Object ? Arg3 : Arg2 |
| StartGenerator | 121 | 122 | 122 | 122 | 122 | 122 | 127 | 127 | 132 | 132 | 134 | 134 | (total size 0) Start the generator by jumping to the next instruction to begin. Restore the stack frame if this generator has previously been suspended. |
||||
| Store16 | 197 | 202 | 202 | 204 | 204 | Reg8, Reg8, Reg8 (total size 3) HEAP16[Arg2] = Arg3 (store signed or unsigned 16-bit integer) |
|||||||||||
| Store32 | 198 | 203 | 203 | 205 | 205 | Reg8, Reg8, Reg8 (total size 3) HEAP32[Arg2] = Arg3 (store signed or unsigned 32-bit integer) |
|||||||||||
| Store8 | 196 | 201 | 201 | 203 | 203 | Reg8, Reg8, Reg8 (total size 3) HEAP8[Arg2] = Arg3 (store signed or unsigned 8-bit integer) |
|||||||||||
| StoreNPToEnvironment | 41 | 41 | 41 | 41 | 41 | 41 | 41 | 42 | 42 | 44 | 44 | 44 | 44 | 47 | 57 | 57 | Reg8, UInt8, Reg8 (total size 3) Store a value in an environment. StoreNPToEnvironment[L] store a non-pointer value in an environment Arg1 is the environment (as fetched by GetEnvironment). Arg2 is the environment index slot number. Arg3 is the value. |
| StoreNPToEnvironmentL | 42 | 42 | 42 | 42 | 42 | 42 | 42 | 43 | 43 | 45 | 45 | 45 | 45 | 48 | 58 | 58 | Reg8, UInt16, Reg8 (total size 4) Store a value in an environment. StoreNPToEnvironment[L] store a non-pointer value in an environment Arg1 is the environment (as fetched by GetEnvironment). Arg2 is the environment index slot number. Arg3 is the value. |
| StoreToEnvironment | 39 | 39 | 39 | 39 | 39 | 39 | 39 | 40 | 40 | 42 | 42 | 42 | 42 | 45 | 55 | 55 | Reg8, UInt8, Reg8 (total size 3) Store a value in an environment. StoreNPToEnvironment[L] store a non-pointer value in an environment Arg1 is the environment (as fetched by GetEnvironment). Arg2 is the environment index slot number. Arg3 is the value. |
| StoreToEnvironmentL | 40 | 40 | 40 | 40 | 40 | 40 | 40 | 41 | 41 | 43 | 43 | 43 | 43 | 46 | 56 | 56 | Reg8, UInt16, Reg8 (total size 4) Store a value in an environment. StoreNPToEnvironment[L] store a non-pointer value in an environment Arg1 is the environment (as fetched by GetEnvironment). Arg2 is the environment index slot number. Arg3 is the value. |
| StrictEq | 14 | 14 | 14 | 14 | 14 | 14 | 14 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 23 | 23 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 === Arg3 (JS strict equality) |
| StrictNeq | 16 | 16 | 16 | 16 | 16 | 16 | 16 | 17 | 17 | 17 | 17 | 17 | 17 | 17 | 25 | 25 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 !== Arg3 (JS strict inequality) |
| StringSwitchImm | 167 | 168 | Reg8, UInt32, UInt32, Addr32, UInt32 (total size 17) All-string switch (switch all of whose case labels are string literals). Arg 1 is the value to be branched upon Arg 2 is a global index for this StringSwitchImm instruction in the bytecode file. Arg 3 is the relative offset of the string switch table. A string switch table is a sequence of pairs: <UInt32 string table index, UInt32 jump targets> Arg 4 is the relative offset for the "default" jump. Arg 5 is the size of the string switch table. Given the above, the jump table entry for a given value (that is in range) is located at offset ip + arg3. Note that Arg3 is *unaligned*; it is dynamically aligned at runtime. |
||||||||||||||
| Sub | 28 | 28 | 28 | 28 | 28 | 28 | 28 | 29 | 29 | 29 | 29 | 29 | 29 | 30 | 38 | 38 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 - Arg3 (JS subtraction) |
| Sub32 | 186 | 191 | 191 | 193 | 193 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 - Arg3 (32-bit integer subtraction) |
|||||||||||
| SubN | 29 | 29 | 29 | 29 | 29 | 29 | 29 | 30 | 30 | 30 | 30 | 30 | 30 | 31 | 39 | 39 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 - Arg3 (Numeric subtraction, skips number check) |
| SwitchImm | 118 | 120 | 121 | 121 | 121 | 121 | 121 | 126 | 126 | 131 | 131 | 133 | 133 | 143 | Reg8, UInt32, Addr32, UInt32, UInt32 (total size 17) Jump table switch - using a table of offset, jump to the offset of the given input or to the default block if out of range (or not right type) Arg 1 is the value to be branched upon Arg 2 is the relative offset of the jump table to be used by this instruction. Jump tables are appended to the bytecode. Arg 3 is the relative offset for the "default" jump. Arg 4 is the unsigned min value, if arg 1 is less than this value jmp to default block Arg 5 is the unsigned max value, if arg 1 is greater than this value jmp to default block. Given the above, the jump table entry for a given value (that is in range) is located at offset ip + arg2 + arg1 - arg4. We subtract arg4 to avoid wasting space when compiling denses switches that do not start at zero. Note that Arg2 is *unaligned* it is dynamically aligned at runtime. |
||
| Throw | 88 | 88 | 88 | 88 | 88 | 88 | 88 | 91 | 91 | 93 | 93 | 95 | 95 | 107 | 121 | 121 | Reg8 (total size 1) Throw an exception. throw Arg1; |
| ThrowIfEmpty | 92 | 92 | 94 | 94 | 96 | 96 | 108 | 122 | 122 | Reg8, Reg8 (total size 2) If Arg2 is Empty, throw ReferenceError, otherwise move it into Arg1. Arg1 is the destination of the return value Arg2 is the value to check |
|||||||
| ThrowIfHasRestrictedGlobalProperty | 53 | 53 | UInt32 (string_id) (total size 4) Checks if globalThis has a restricted global property with the given name. Arg1 is the name to check. |
||||||||||||||
| ThrowIfThisInitialized | 124 | 124 | Reg8 (total size 1) If Arg1 is not Empty, throw ReferenceError. Arg1 is the checked this of a derived constructor. |
||||||||||||||
| ThrowIfUndefined | 123 | 123 | Reg8, Reg8 (total size 2) If Arg2 is Undefined, throw ReferenceError, otherwise move it into Arg1. Arg1 is the destination of the return value Arg2 is the value to check |
||||||||||||||
| ThrowIfUndefinedInst | 89 | 89 | 89 | 89 | 89 | Reg8 (total size 1) Throw ReferenceError if the operand is HermesValue::undefined |
|||||||||||
| ToInt32 | 112 | 114 | 115 | 115 | 115 | 115 | 115 | 120 | 120 | 125 | 125 | 127 | 127 | 135 | 156 | 156 | Reg8, Reg8 (total size 2) Convert a value to a 32-bit signed integer. Arg1 = Arg2 | 0 |
| ToNumber | 111 | 113 | 114 | 114 | 114 | 114 | 114 | 119 | 119 | 123 | 123 | 125 | 125 | 133 | 154 | 154 | Reg8, Reg8 (total size 2) Convert a value to a number. Arg1 = Arg2 - 0 |
| ToNumeric | 124 | 124 | 126 | 126 | 134 | 155 | 155 | Reg8, Reg8 (total size 2) Convert a value to a numberic. Arg1 = ToNumeric(Arg2) |
|||||||||
| ToPropertyKey | 164 | 165 | Reg8, Reg8 (total size 2) Convert a value to a property key, used to evaluate a ComputedPropertyName. Arg1 = ToPropertyKey(Arg2) |
||||||||||||||
| ToUint32 | 157 | Reg8, Reg8 (total size 2) Convert a value to a 32-bit unsigned integer. Arg1 = Arg2 >>> 0 |
|||||||||||||||
| TryGetById | 52 | 52 | 52 | 52 | 52 | 52 | 52 | 53 | 53 | 55 | 55 | 57 | 57 | 60 | 72 | 72 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Get an object property by string table index, or throw if not found. This is similar to GetById, but intended for use with global variables where Arg2 = GetGlobalObject. |
| TryGetByIdLong | 53 | 53 | 53 | 53 | 53 | 53 | 53 | 54 | 54 | 56 | 56 | 58 | 58 | 61 | 73 | 73 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Get an object property by string table index, or throw if not found. This is similar to GetById, but intended for use with global variables where Arg2 = GetGlobalObject. |
| TryPutById | 56 | 56 | 56 | 56 | 56 | 56 | 56 | 57 | 57 | 59 | 59 | 61 | 61 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||
| TryPutByIdLong | 57 | 57 | 57 | 57 | 57 | 57 | 57 | 58 | 58 | 60 | 60 | 62 | 62 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||
| TryPutByIdLoose | 66 | 78 | 78 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||||||||||||
| TryPutByIdLooseLong | 68 | 80 | 80 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||||||||||||
| TryPutByIdStrict | 67 | 79 | 79 | Reg8, Reg8, UInt8, UInt16 (string_id) (total size 5) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||||||||||||
| TryPutByIdStrictLong | 69 | 81 | 81 | Reg8, Reg8, UInt8, UInt32 (string_id) (total size 7) Set an object property by string index, or throw if undeclared. This is similar to PutById, but intended for use with global variables where Arg1 = GetGlobalObject. |
|||||||||||||
| TypeOf | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 21 | 21 | Reg8, Reg8 (total size 2) Arg1 = typeof Arg2 (JS typeof) |
| TypeOfIs | 51 | 51 | Reg8, Reg8, UInt16 (total size 4) Arg1 = typeof Arg2 is in Arg3 (TypeOfIsTypes, see Typeof.h) |
||||||||||||||
| TypedLoadParent | 173 | 174 | Reg8, Reg8 (total size 2) Arg1 [out] is the result. Arg2 [in] is the source (must be an object). |
||||||||||||||
| UIntSwitchImm | 166 | 167 | Reg8, UInt32, Addr32, UInt32, UInt32 (total size 17) Jump table switch - using a table of offset, jump to the offset of the given input or to the default block if out of range (or not right type) Arg 1 is the value to be branched upon Arg 2 is the relative offset of the jump table to be used by this instruction. Jump tables are appended to the bytecode. Arg 3 is the relative offset for the "default" jump. Arg 4 is the unsigned min value, if arg 1 is/ less than this value jmp to default block Arg 5 is the unsigned max value, if arg 1 is greater than this value jmp to default block. Given the above, the jump table entry for a given value (that is in range) is located at offset ip + arg2 + arg1 - arg4. We subtract arg4 to avoid wasting space when compiling denses switches that do not start at zero. Note that Arg2 is *unaligned* it is dynamically aligned at runtime. |
||||||||||||||
| URshift | 32 | 32 | 32 | 32 | 32 | 32 | 32 | 33 | 33 | 33 | 33 | 33 | 33 | 34 | 42 | 42 | Reg8, Reg8, Reg8 (total size 3) Arg1 = Arg2 >>> Arg3 (JS unsigned bitshift right) |
| Unreachable | 92 | 92 | 93 | 93 | 93 | 93 | 93 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | (total size 0) Unreachable opcode for stubs and similar. This is first so that it has the value zero. |