diff options
Diffstat (limited to 'files/ja/mozilla/projects/spidermonkey/internals/bytecode/index.html')
-rw-r--r-- | files/ja/mozilla/projects/spidermonkey/internals/bytecode/index.html | 6855 |
1 files changed, 6855 insertions, 0 deletions
diff --git a/files/ja/mozilla/projects/spidermonkey/internals/bytecode/index.html b/files/ja/mozilla/projects/spidermonkey/internals/bytecode/index.html new file mode 100644 index 0000000000..f4e65a7748 --- /dev/null +++ b/files/ja/mozilla/projects/spidermonkey/internals/bytecode/index.html @@ -0,0 +1,6855 @@ +--- +title: バイトコードの説明 +slug: Mozilla/Projects/SpiderMonkey/Internals/Bytecode +tags: + - SpiderMonkey +translation_of: Mozilla/Projects/SpiderMonkey/Internals/Bytecode +--- +<div>{{SpiderMonkeySidebar("Internals")}}</div> + +<h2 id="バイトコード一覧">バイトコード一覧</h2> + +<p>この文書は <a href="http://dxr.mozilla.org/mozilla-central/source/js/src/vm/make_opcode_doc.py">make_opcode_doc.py</a> によって <a href="http://dxr.mozilla.org/mozilla-central/source/js/src/vm/Opcodes.h">Opcodes.h</a> から自動的に生成されます。</p> + +<h3 id="ステートメント">ステートメント</h3> + +<h4 id="Jumps">Jumps</h4> + +<dl> + <dt id="JSOP_AND">JSOP_AND [-1, +1] (JUMP, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>69 (0x45)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>cond</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>cond</code></td> + </tr> + </tbody> + </table> + + <p>スタックの先頭の値をブール値に変換し、結果が <code>false</code> の場合、現在のバイトコードから 32-bit のオフセットにジャンプします。</p> + </dd> + <dt id="JSOP_GOTO">JSOP_GOTO [-0, +0] (JUMP)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>6 (0x06)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>現在のバイトコードから 32-bit のオフセットにジャンプします。</p> + </dd> + <dt id="JSOP_IFEQ">JSOP_IFEQ [-1, +0] (JUMP, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>7 (0x07)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>cond</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, converts it into a boolean, if the result is <code>false</code>, jumps to a 32-bit offset from the current bytecode.</p> + + <p>The idea is that a sequence like <code>JSOP_ZERO</code>; <code>JSOP_ZERO</code>; <code>JSOP_EQ</code>; <code>JSOP_IFEQ</code>; <code>JSOP_RETURN</code>; reads like a nice linear sequence that will execute the return.</p> + </dd> + <dt id="JSOP_IFNE">JSOP_IFNE [-1, +0] (JUMP, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>8 (0x08)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>cond</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, converts it into a boolean, if the result is <code>true</code>, jumps to a 32-bit offset from the current bytecode.</p> + </dd> + <dt id="JSOP_LABEL">JSOP_LABEL [-0, +0] (CODE_OFFSET)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>106 (0x6a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This opcode precedes every labeled statement. It's a no-op.</p> + + <p><code>offset</code> is the offset to the next instruction after this statement, the one <code>break LABEL;</code> would jump to. IonMonkey uses this.</p> + </dd> + <dt id="JSOP_LOOPENTRY">JSOP_LOOPENTRY [-0, +0] (LOOPENTRY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>227 (0xe3)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t icIndex, uint8_t BITFIELD</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>6</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>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. See <code>JSOP_JUMPTARGET</code> for the icIndex argument.</p> + </dd> + <dt id="JSOP_LOOPHEAD">JSOP_LOOPHEAD [-0, +0] (ICINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>109 (0x6d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t icIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Another no-op.</p> + + <p>This opcode is the target of the backwards jump for some loop. See <code>JSOP_JUMPTARGET</code> for the icIndex operand.</p> + </dd> + <dt id="JSOP_OR">JSOP_OR [-1, +1] (JUMP, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>68 (0x44)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>cond</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>cond</code></td> + </tr> + </tbody> + </table> + + <p>Converts the top of stack value into a boolean, if the result is <code>true</code>, jumps to a 32-bit offset from the current bytecode.</p> + </dd> +</dl> + +<h4 id="Switch_Statement">Switch Statement</h4> + +<dl> + <dt id="JSOP_CASE">JSOP_CASE [-2, +1] (JUMP)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>121 (0x79)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val, cond</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val(if !cond)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>val</code> and <code>cond</code>. If <code>cond</code> is <code>true</code>, jumps to a 32-bit offset from the current bytecode, re-pushes <code>val</code> onto the stack if <code>false</code>.</p> + </dd> + <dt id="JSOP_CONDSWITCH">JSOP_CONDSWITCH [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>120 (0x78)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This no-op appears after the bytecode for EXPR in <code>switch (EXPR) {...}</code> if the switch cannot be optimized using <code>JSOP_TABLESWITCH</code>.</p> + + <p>For a non-optimized switch statement like this:</p> + + <pre class="notranslate"> switch (EXPR) { + case V0: + C0; + ... + default: + D; + } +</pre> + + <p>the bytecode looks like this:</p> + + <pre class="notranslate"> (EXPR) + condswitch + (V0) + case ->C0 + ... + default ->D + (C0) + ... + (D) +</pre> + + <p>Note that code for all case-labels is emitted first, then code for the body of each case clause.</p> + </dd> + <dt id="JSOP_DEFAULT">JSOP_DEFAULT [-1, +0] (JUMP)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>122 (0x7a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This appears after all cases in a <code>JSOP_CONDSWITCH</code>, whether there is a <code>default:</code> 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.</p> + </dd> + <dt id="JSOP_TABLESWITCH">JSOP_TABLESWITCH [-1, +0] (TABLESWITCH, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>70 (0x46)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t len, int32_t low, int32_t high,uint24_t firstResumeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>len</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>i</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>i</code>, if <code>low <= i <= high</code>, jumps to a 32-bit offset: offset is stored in the script's resumeOffsets</p> + + <pre class="notranslate"> list at index 'firstResumeIndex + (i - low)' +</pre> + + <p>jumps to a 32-bit offset: <code>len</code> from the current bytecode otherwise</p> + </dd> +</dl> + +<h4 id="For-In_Statement">For-In Statement</h4> + +<dl> + <dt id="JSOP_ENDITER">JSOP_ENDITER [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>78 (0x4e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>iter</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Exits a for-in loop by popping the iterator object from the stack and closing it.</p> + </dd> + <dt id="JSOP_ISGENCLOSING">JSOP_ISGENCLOSING [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>187 (0xbb)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val, res</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a boolean indicating whether the top of the stack is MagicValue(<code>JS_GENERATOR_CLOSING</code>).</p> + </dd> + <dt id="JSOP_ISNOITER">JSOP_ISNOITER [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>77 (0x4d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val, res</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a boolean indicating whether the value on top of the stack is MagicValue(<code>JS_NO_ITER_VALUE</code>).</p> + </dd> + <dt id="JSOP_ITER">JSOP_ITER [-1, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>75 (0x4b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>iter</code></td> + </tr> + </tbody> + </table> + + <p>Sets up a for-in loop. It pops the top of stack value as <code>val</code> and pushes <code>iter</code> which is an iterator for <code>val</code>.</p> + </dd> + <dt id="JSOP_MOREITER">JSOP_MOREITER [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>76 (0x4c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>iter</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>iter, val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the next iterated value onto the stack. If no value is available, MagicValue(<code>JS_NO_ITER_VALUE</code>) is pushed.</p> + </dd> +</dl> + +<h4 id="With_Statement">With Statement</h4> + +<dl> + <dt id="JSOP_ENTERWITH">JSOP_ENTERWITH [-1, +0] (SCOPE)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>3 (0x03)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t staticWithIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, converts it to an object, and adds a <code>WithEnvironmentObject</code> wrapping that object to the environment chain.</p> + + <p>There is a matching <code>JSOP_LEAVEWITH</code> instruction later. All name lookups between the two that may need to consult the With object are deoptimized.</p> + </dd> + <dt id="JSOP_LEAVEWITH">JSOP_LEAVEWITH [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>4 (0x04)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the environment chain object pushed by <code>JSOP_ENTERWITH</code>.</p> + </dd> +</dl> + +<h4 id="Exception_Handling">Exception Handling</h4> + +<dl> + <dt id="JSOP_EXCEPTION">JSOP_EXCEPTION [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>118 (0x76)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>exception</code></td> + </tr> + </tbody> + </table> + + <p>Pushes 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 <code>yield*</code>.</p> + </dd> + <dt id="JSOP_FINALLY">JSOP_FINALLY [-0, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>135 (0x87)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>false, resumeIndex</code></td> + </tr> + </tbody> + </table> + + <p>This opcode has a def count of 2, but these values are already on the stack (they're pushed by <code>JSOP_GOSUB</code>).</p> + </dd> + <dt id="JSOP_GOSUB">JSOP_GOSUB [-2, +0] (JUMP)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>116 (0x74)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t offset</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>false, resumeIndex</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This opcode is used for entering a <code>finally</code> block. Jumps to a 32-bit offset from the current pc.</p> + + <p>Note: this op doesn't actually push/pop any values, but it has a use count of 2 (for the <code>false</code> + resumeIndex values pushed by preceding bytecode ops) because the <code>finally</code> entry point does not expect these values on the stack. See also <code>JSOP_FINALLY</code> (it has a def count of 2).</p> + + <p>When the execution resumes from <code>finally</code> block, those stack values are popped.</p> + </dd> + <dt id="JSOP_RETSUB">JSOP_RETSUB [-2, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>117 (0x75)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This opcode is used for returning from a <code>finally</code> block.</p> + + <p>Pops the top two values on the stack as <code>rval</code> and <code>lval</code>. Then: - If <code>lval</code> is true, throws <code>rval</code>. - If <code>lval</code> is false, jumps to the resumeIndex stored in <code>lval</code>.</p> + </dd> + <dt id="JSOP_THROW">JSOP_THROW [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>112 (0x70)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>v</code>, sets pending exception as <code>v</code>, then raises error.</p> + </dd> + <dt id="JSOP_THROWMSG">JSOP_THROWMSG [-0, +0] (UINT16)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>74 (0x4a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t msgNumber</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Sometimes we know when emitting that an operation will always throw.</p> + + <p>Throws the indicated <code>JSMSG</code>.</p> + </dd> + <dt id="JSOP_TRY">JSOP_TRY [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>134 (0x86)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This no-op appears at the top of the bytecode for a <code>TryStatement</code>.</p> + + <p>Location information for catch/finally blocks is stored in a side table, <code>script->trynotes()</code>.</p> + </dd> +</dl> + +<h4 id="Function">Function</h4> + +<dl> + <dt id="JSOP_CALL">JSOP_CALL [-(argc+2), +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>58 (0x3a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>callee</code> with <code>this</code> and <code>args</code>, pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_CALLITER">JSOP_CALLITER [-2, +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>145 (0x91)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc (must be 0)</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Like <code>JSOP_CALL</code>, but used as part of for-of and destructuring bytecode to provide better error messages.</p> + </dd> + <dt id="JSOP_CALL_IGNORES_RV">JSOP_CALL_IGNORES_RV [-(argc+2), +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>231 (0xe7)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Like <code>JSOP_CALL</code>, but tells the function that the return value is ignored. stack.</p> + </dd> + <dt id="JSOP_CHECKISCALLABLE">JSOP_CHECKISCALLABLE [-1, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>219 (0xdb)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t kind</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Checks that the top value on the stack is callable, and throws a TypeError if not. The operand <code>kind</code> is used only to generate an appropriate error message.</p> + </dd> + <dt id="JSOP_EVAL">JSOP_EVAL [-(argc+2), +1] (ARGC, INVOKE, TYPESET, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>123 (0x7b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>eval</code> with <code>args</code> and pushes return value onto the stack.</p> + + <p>If <code>eval</code> in global scope is not original one, invokes the function with <code>this</code> and <code>args</code>, and pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_FUNAPPLY">JSOP_FUNAPPLY [-(argc+2), +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>79 (0x4f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>callee</code> with <code>this</code> and <code>args</code>, pushes return value onto the stack.</p> + + <p>This is for <code>f.apply</code>.</p> + </dd> + <dt id="JSOP_FUNCALL">JSOP_FUNCALL [-(argc+2), +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>108 (0x6c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>callee</code> with <code>this</code> and <code>args</code>, pushes return value onto the stack.</p> + + <p>If <code>callee</code> is determined to be the canonical <code>Function.prototype.call</code> function, then this operation is optimized to directly call <code>callee</code> with <code>args[0]</code> as <code>this</code>, and the remaining arguments as formal args to <code>callee</code>.</p> + + <p>Like <code>JSOP_FUNAPPLY</code> but for <code>f.call</code> instead of <code>f.apply</code>.</p> + </dd> + <dt id="JSOP_FUNWITHPROTO">JSOP_FUNWITHPROTO [-1, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>52 (0x34)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t funcIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>proto</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a clone of a function with a given [[Prototype]] onto the stack.</p> + </dd> + <dt id="JSOP_GETRVAL">JSOP_GETRVAL [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>2 (0x02)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Pushes stack frame's <code>rval</code> onto the stack.</p> + </dd> + <dt id="JSOP_LAMBDA">JSOP_LAMBDA [-0, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>130 (0x82)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t funcIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a closure for a named or anonymous function expression onto the stack.</p> + </dd> + <dt id="JSOP_LAMBDA_ARROW">JSOP_LAMBDA_ARROW [-1, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>131 (0x83)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t funcIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>new.target</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>new.target</code>, pushes an arrow function with lexical <code>new.target</code> onto the stack.</p> + </dd> + <dt id="JSOP_NEW">JSOP_NEW [-(argc+3), +1] (ARGC, INVOKE, TYPESET, IC, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>82 (0x52)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1], newTarget</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>callee</code> as a constructor with <code>this</code> and <code>args</code>, pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_OPTIMIZE_SPREADCALL">JSOP_OPTIMIZE_SPREADCALL [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>178 (0xb2)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>arr</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>arr, optimized</code></td> + </tr> + </tbody> + </table> + + <p>Pops 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.</p> + </dd> + <dt id="JSOP_RETRVAL">JSOP_RETRVAL [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>153 (0x99)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Stops interpretation and returns value set by <code>JSOP_SETRVAL</code>. When not set, returns <code>undefined</code>.</p> + + <p>Also emitted at end of script so interpreter don't need to check if opcode is still in script range.</p> + </dd> + <dt id="JSOP_RETURN">JSOP_RETURN [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>5 (0x05)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>rval</code>, stops interpretation of current script and returns <code>rval</code>.</p> + </dd> + <dt id="JSOP_SETFUNNAME">JSOP_SETFUNNAME [-2, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>182 (0xb6)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t prefixKind</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>fun, name</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>fun</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>name</code> and <code>fun</code>, defines the name of <code>fun</code> to <code>name</code> with prefix if any, and pushes <code>fun</code> back onto the stack.</p> + </dd> + <dt id="JSOP_SETRVAL">JSOP_SETRVAL [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>152 (0x98)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>rval</code>, sets the return value in stack frame as <code>rval</code>.</p> + </dd> + <dt id="JSOP_SPREADCALL">JSOP_SPREADCALL [-3, +1] (INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>41 (0x29)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>spreadcall variant of <code>JSOP_CALL</code>.</p> + + <p>Invokes <code>callee</code> with <code>this</code> and <code>args</code>, pushes the return value onto the stack.</p> + + <p><code>args</code> is an Array object which contains actual arguments.</p> + </dd> + <dt id="JSOP_SPREADEVAL">JSOP_SPREADEVAL [-3, +1] (INVOKE, TYPESET, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>43 (0x2b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>spreadcall variant of <code>JSOP_EVAL</code></p> + + <p>Invokes <code>eval</code> with <code>args</code> and pushes the return value onto the stack.</p> + + <p>If <code>eval</code> in global scope is not original one, invokes the function with <code>this</code> and <code>args</code>, and pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_SPREADNEW">JSOP_SPREADNEW [-4, +1] (INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>42 (0x2a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args, newTarget</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>spreadcall variant of <code>JSOP_NEW</code></p> + + <p>Invokes <code>callee</code> as a constructor with <code>this</code> and <code>args</code>, pushes the return value onto the stack.</p> + </dd> + <dt id="JSOP_SPREADSUPERCALL">JSOP_SPREADSUPERCALL [-4, +1] (INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>166 (0xa6)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args, newTarget</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>spreadcall variant of <code>JSOP_SUPERCALL</code>.</p> + + <p>Behaves exactly like <code>JSOP_SPREADNEW</code>.</p> + </dd> + <dt id="JSOP_STRICTEVAL">JSOP_STRICTEVAL [-(argc+2), +1] (ARGC, INVOKE, TYPESET, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>124 (0x7c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Invokes <code>eval</code> with <code>args</code> and pushes return value onto the stack.</p> + + <p>If <code>eval</code> in global scope is not original one, invokes the function with <code>this</code> and <code>args</code>, and pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_STRICTSPREADEVAL">JSOP_STRICTSPREADEVAL [-3, +1] (INVOKE, TYPESET, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>50 (0x32)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>spreadcall variant of <code>JSOP_EVAL</code></p> + + <p>Invokes <code>eval</code> with <code>args</code> and pushes the return value onto the stack.</p> + + <p>If <code>eval</code> in global scope is not original one, invokes the function with <code>this</code> and <code>args</code>, and pushes return value onto the stack.</p> + </dd> + <dt id="JSOP_SUPERCALL">JSOP_SUPERCALL [-(argc+3), +1] (ARGC, INVOKE, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>165 (0xa5)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argc</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee, this, args[0], ..., args[argc-1], newTarget</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Behaves exactly like <code>JSOP_NEW</code>, but allows JITs to distinguish the two cases.</p> + </dd> + <dt id="JSOP_TRYSKIPAWAIT">JSOP_TRYSKIPAWAIT [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>223 (0xdf)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>value</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>value_or_resolved, canskip</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value as <code>value</code>, checks if the await for <code>value</code> can be skipped. If the await operation can be skipped and the resolution value for <code>value</code> can be acquired, pushes the resolution value and <code>true</code> onto the stack. Otherwise, pushes <code>value</code> and <code>false</code> on the stack.</p> + </dd> +</dl> + +<h4 id="Generator">Generator</h4> + +<dl> + <dt id="JSOP_ASYNCAWAIT">JSOP_ASYNCAWAIT [-2, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>151 (0x97)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>value, gen</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>promise</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>value</code> and <code>gen</code> from the stack, then starts "awaiting" for <code>value</code> to be resolved, which will then resume the execution of <code>gen</code>. Pushes the async function promise on the stack, so that it'll be returned to the caller on the very first "await".</p> + </dd> + <dt id="JSOP_ASYNCRESOLVE">JSOP_ASYNCRESOLVE [-2, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>192 (0xc0)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t fulfillOrReject</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>valueOrReason, gen</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>promise</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>valueOrReason</code> and <code>gen</code> from the stack, then pushes the promise resolved with <code>valueOrReason</code>. `gen` must be the internal generator object created in async functions. The pushed promise is the async function's result promise, which is stored in `gen`.</p> + </dd> + <dt id="JSOP_AWAIT">JSOP_AWAIT [-2, +1] (RESUMEINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>209 (0xd1)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t resumeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>promise, gen</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>resolved</code></td> + </tr> + </tbody> + </table> + + <p>Pops the generator and the return value <code>promise</code>, stops interpretation and returns <code>promise</code>. Pushes resolved value onto the stack.</p> + </dd> + <dt id="JSOP_CHECKISOBJ">JSOP_CHECKISOBJ [-1, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>14 (0x0e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t kind</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>result</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>result</code></td> + </tr> + </tbody> + </table> + + <p>Checks that the top value on the stack is an object, and throws a TypeError if not. The operand <code>kind</code> is used only to generate an appropriate error message.</p> + </dd> + <dt id="JSOP_FINALYIELDRVAL">JSOP_FINALYIELDRVAL [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>204 (0xcc)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>gen</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the generator and suspends and closes it. Yields the value in the frame's return value slot.</p> + </dd> + <dt id="JSOP_GENERATOR">JSOP_GENERATOR [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>212 (0xd4)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>generator</code></td> + </tr> + </tbody> + </table> + + <p>Initializes generator frame, creates a generator and pushes it on the stack.</p> + </dd> + <dt id="JSOP_INITIALYIELD">JSOP_INITIALYIELD [-1, +1] (RESUMEINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>202 (0xca)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t resumeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>generator</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>generator</code></td> + </tr> + </tbody> + </table> + + <p>Pops the generator from the top of the stack, suspends it and stops interpretation.</p> + </dd> + <dt id="JSOP_RESUME">JSOP_RESUME [-2, +1] (UINT8, INVOKE)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>205 (0xcd)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>resume kind (AbstractGeneratorObject::ResumeKind)</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>gen, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Pops 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.</p> + </dd> + <dt id="JSOP_TOASYNCITER">JSOP_TOASYNCITER [-2, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>210 (0xd2)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>iter, next</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>asynciter</code></td> + </tr> + </tbody> + </table> + + <p>Pops the iterator and its next method from the top of the stack, and create async iterator from it and push the async iterator back onto the stack.</p> + </dd> + <dt id="JSOP_YIELD">JSOP_YIELD [-2, +1] (RESUMEINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>203 (0xcb)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t resumeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>rval1, gen</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval2</code></td> + </tr> + </tbody> + </table> + + <p>Pops the generator and the return value <code>rval1</code>, stops interpretation and returns <code>rval1</code>. Pushes sent value from <code>send()</code> onto the stack.</p> + </dd> +</dl> + +<h4 id="Debugger">Debugger</h4> + +<dl> + <dt id="JSOP_DEBUGGER">JSOP_DEBUGGER [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>115 (0x73)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Invokes debugger.</p> + </dd> + <dt id="JSOP_DEBUGLEAVELEXICALENV">JSOP_DEBUGLEAVELEXICALENV [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>201 (0xc9)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>The opcode to assist the debugger.</p> + </dd> +</dl> + +<h3 id="Variables_and_Scopes">Variables and Scopes</h3> + +<h4 id="Variables">Variables</h4> + +<dl> + <dt id="JSOP_BINDNAME">JSOP_BINDNAME [-0, +1] (ATOM, NAME, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>110 (0x6e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>env</code></td> + </tr> + </tbody> + </table> + + <p>Looks 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.</p> + </dd> + <dt id="JSOP_DEFCONST">JSOP_DEFCONST [-0, +0] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>128 (0x80)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Defines the new constant binding on global lexical environment.</p> + + <p>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.</p> + </dd> + <dt id="JSOP_DEFFUN">JSOP_DEFFUN [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>127 (0x7f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>fun</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Defines the given function on the current scope.</p> + + <p>This is used for global scripts and also in some cases for function scripts where use of dynamic scoping inhibits optimization.</p> + </dd> + <dt id="JSOP_DEFLET">JSOP_DEFLET [-0, +0] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>162 (0xa2)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Defines the new mutable binding on global lexical environment.</p> + + <p>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.</p> + </dd> + <dt id="JSOP_DEFVAR">JSOP_DEFVAR [-0, +0] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>129 (0x81)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Defines the new binding on the frame's current variables-object (the environment on the environment chain designated to receive new variables).</p> + + <p>Throws if the current variables-object is the global object and a binding with the same name exists on the global lexical environment.</p> + + <p>This is used for global scripts and also in some cases for function scripts where use of dynamic scoping inhibits optimization.</p> + </dd> + <dt id="JSOP_DELNAME">JSOP_DELNAME [-0, +1] (ATOM, NAME, CHECKSLOPPY)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>36 (0x24)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p>Looks up name on the environment chain and deletes it, pushes <code>true</code> onto the stack if succeeded (if the property was present and deleted or if the property wasn't present in the first place), <code>false</code> if not.</p> + + <p>Strict mode code should never contain this opcode.</p> + </dd> + <dt id="JSOP_GETIMPORT">JSOP_GETIMPORT [-0, +1] (ATOM, NAME, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>176 (0xb0)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Gets the value of a module import by name and pushes it onto the stack.</p> + </dd> + <dt id="JSOP_GETNAME">JSOP_GETNAME [-0, +1] (ATOM, NAME, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>59 (0x3b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Looks up name on the environment chain and pushes its value onto the stack.</p> + </dd> + <dt id="JSOP_SETNAME">JSOP_SETNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>111 (0x6f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>env, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops an environment and value from the stack, assigns value to the given name, and pushes the value back on the stack</p> + </dd> + <dt id="JSOP_STRICTSETNAME">JSOP_STRICTSETNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>49 (0x31)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>env, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops 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.</p> + </dd> +</dl> + +<h4 id="Free_Variables">Free Variables</h4> + +<dl> + <dt id="JSOP_BINDGNAME">JSOP_BINDGNAME [-0, +1] (ATOM, NAME, GNAME, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>214 (0xd6)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>global</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the global environment onto the stack if the script doesn't have a non-syntactic global scope. Otherwise will act like <code>JSOP_BINDNAME</code>.</p> + + <p><code>nameIndex</code> is only used when acting like <code>JSOP_BINDNAME</code>.</p> + </dd> + <dt id="JSOP_BINDVAR">JSOP_BINDVAR [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>213 (0xd5)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>env</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the nearest <code>var</code> environment.</p> + </dd> + <dt id="JSOP_GETGNAME">JSOP_GETGNAME [-0, +1] (ATOM, NAME, TYPESET, GNAME, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>154 (0x9a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Looks 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 <code>JSOP_NAME</code>.</p> + + <p>Free variable references that must either be found on the global or a ReferenceError.</p> + </dd> + <dt id="JSOP_INITGLEXICAL">JSOP_INITGLEXICAL [-1, +1] (ATOM, NAME, PROPINIT, GNAME, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>161 (0xa1)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Initializes an uninitialized global lexical binding with the top of stack value.</p> + </dd> + <dt id="JSOP_SETGNAME">JSOP_SETGNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, GNAME, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>155 (0x9b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>env, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>val</code> and <code>env</code>, sets property of <code>env</code> as <code>val</code> and pushes <code>val</code> back on the stack.</p> + + <p><code>env</code> should be the global lexical environment unless the script has a non-syntactic global scope, in which case acts like <code>JSOP_SETNAME</code>.</p> + </dd> + <dt id="JSOP_STRICTSETGNAME">JSOP_STRICTSETGNAME [-2, +1] (ATOM, NAME, PROPSET, DETECTING, GNAME, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>156 (0x9c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>env, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>val</code> and <code>env</code>, sets property of <code>env</code> as <code>val</code> and pushes <code>val</code> back on the stack. Throws a TypeError if the set fails, per strict mode semantics.</p> + + <p><code>env</code> should be the global lexical environment unless the script has a non-syntactic global scope, in which case acts like <code>JSOP_STRICTSETNAME</code>.</p> + </dd> +</dl> + +<h4 id="Local_Variables">Local Variables</h4> + +<dl> + <dt id="JSOP_CHECKLEXICAL">JSOP_CHECKLEXICAL [-0, +0] (LOCAL, NAME)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>138 (0x8a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t localno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Checks if the value of the local variable is the <code>JS_UNINITIALIZED_LEXICAL</code> magic, throwing an error if so.</p> + </dd> + <dt id="JSOP_GETLOCAL">JSOP_GETLOCAL [-0, +1] (LOCAL, NAME)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>86 (0x56)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t localno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the value of local variable onto the stack.</p> + </dd> + <dt id="JSOP_INITLEXICAL">JSOP_INITLEXICAL [-1, +1] (LOCAL, NAME, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>139 (0x8b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t localno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Initializes an uninitialized local lexical binding with the top of stack value.</p> + </dd> + <dt id="JSOP_SETLOCAL">JSOP_SETLOCAL [-1, +1] (LOCAL, NAME, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>87 (0x57)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t localno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Stores the top stack value to the given local.</p> + </dd> + <dt id="JSOP_THROWSETCALLEE">JSOP_THROWSETCALLEE [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>179 (0xb3)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Throws a runtime TypeError for invalid assignment to the callee in a named lambda, which is always a <code>const</code> binding. This is a different bytecode than <code>JSOP_SETCONST</code> because the named lambda callee, if not closed over, does not have a frame slot to look up the name with for the error message.</p> + </dd> + <dt id="JSOP_THROWSETCONST">JSOP_THROWSETCONST [-1, +1] (LOCAL, NAME, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>169 (0xa9)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t localno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Throws a runtime TypeError for invalid assignment to <code>const</code>. The localno is used for better error messages.</p> + </dd> +</dl> + +<h4 id="Aliased_Variables">Aliased Variables</h4> + +<dl> + <dt id="JSOP_CHECKALIASEDLEXICAL">JSOP_CHECKALIASEDLEXICAL [-0, +0] (ENVCOORD, NAME)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>140 (0x8c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t hops, uint24_t slot</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Checks if the value of the aliased variable is the <code>JS_UNINITIALIZED_LEXICAL</code> magic, throwing an error if so.</p> + </dd> + <dt id="JSOP_GETALIASEDVAR">JSOP_GETALIASEDVAR [-0, +1] (ENVCOORD, NAME, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>136 (0x88)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t hops, uint24_t slot</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>aliasedVar</code></td> + </tr> + </tbody> + </table> + + <p>Pushes aliased variable onto the stack.</p> + + <p>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, <code>eval</code>, <code>with</code>, and <code>arguments</code>. All of these cases require creating a CallObject to own the aliased variable.</p> + + <p>An ALIASEDVAR opcode contains the following immediates:</p> + + <pre class="notranslate">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). +</pre> + </dd> + <dt id="JSOP_INITALIASEDLEXICAL">JSOP_INITALIASEDLEXICAL [-1, +1] (ENVCOORD, NAME, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>141 (0x8d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t hops, uint24_t slot</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Initializes an uninitialized aliased lexical binding with the top of stack value.</p> + </dd> + <dt id="JSOP_SETALIASEDVAR">JSOP_SETALIASEDVAR [-1, +1] (ENVCOORD, NAME, PROPSET, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>137 (0x89)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t hops, uint24_t slot</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Sets aliased variable as the top of stack value.</p> + </dd> + <dt id="JSOP_THROWSETALIASEDCONST">JSOP_THROWSETALIASEDCONST [-1, +1] (ENVCOORD, NAME, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>170 (0xaa)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t hops, uint24_t slot</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Throws a runtime TypeError for invalid assignment to <code>const</code>. The environment coordinate is used for better error messages.</p> + </dd> +</dl> + +<h4 id="Intrinsics">Intrinsics</h4> + +<dl> + <dt id="JSOP_GETINTRINSIC">JSOP_GETINTRINSIC [-0, +1] (ATOM, NAME, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>143 (0x8f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>intrinsic[name]</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the value of the intrinsic onto the stack.</p> + + <p>Intrinsic names are emitted instead of <code>JSOP_*NAME</code> ops when the <code>CompileOptions</code> flag <code>selfHostingMode</code> is set.</p> + + <p>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.</p> + </dd> + <dt id="JSOP_SETINTRINSIC">JSOP_SETINTRINSIC [-1, +1] (ATOM, NAME, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>144 (0x90)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Stores the top stack value in the specified intrinsic.</p> + </dd> +</dl> + +<h4 id="Block-local_Scope">Block-local Scope</h4> + +<dl> + <dt id="JSOP_FRESHENLEXICALENV">JSOP_FRESHENLEXICALENV [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>197 (0xc5)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Replaces the current block on the env chain with a fresh block that copies all the bindings in the block. 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.</p> + </dd> + <dt id="JSOP_POPLEXICALENV">JSOP_POPLEXICALENV [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>200 (0xc8)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops lexical environment from the env chain.</p> + </dd> + <dt id="JSOP_PUSHLEXICALENV">JSOP_PUSHLEXICALENV [-0, +0] (SCOPE)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>199 (0xc7)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t scopeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pushes lexical environment onto the env chain.</p> + </dd> + <dt id="JSOP_RECREATELEXICALENV">JSOP_RECREATELEXICALENV [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>198 (0xc6)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>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.</p> + </dd> +</dl> + +<h4 id="This">This</h4> + +<dl> + <dt id="JSOP_CHECKRETURN">JSOP_CHECKRETURN [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>190 (0xbe)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>this</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Check if a derived class constructor has a valid return value and <code>this</code> value before it returns. If the return value is not an object, stores the <code>this</code> value to the return value slot.</p> + </dd> + <dt id="JSOP_CHECKTHIS">JSOP_CHECKTHIS [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>189 (0xbd)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>this</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Throw if the value on top of the stack is the TDZ MagicValue. Used in derived class constructors.</p> + </dd> + <dt id="JSOP_CHECKTHISREINIT">JSOP_CHECKTHISREINIT [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>191 (0xbf)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>this</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Throw an exception if the value on top of the stack is not the TDZ MagicValue. Used in derived class constructors.</p> + </dd> + <dt id="JSOP_FUNCTIONTHIS">JSOP_FUNCTIONTHIS [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>185 (0xb9)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Determines the <code>this</code> value for current function frame and pushes it onto the stack. Emitted in the prologue of functions with a this-binding.</p> + </dd> + <dt id="JSOP_GIMPLICITTHIS">JSOP_GIMPLICITTHIS [-0, +1] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>157 (0x9d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the implicit <code>this</code> value for calls to the associated name onto the stack; only used when the implicit this might be derived from a non-syntactic scope (instead of the global itself).</p> + + <p>Note that code evaluated via the Debugger API uses DebugEnvironmentProxy objects on its scope chain, which are non-syntactic environments that refer to syntactic environments. As a result, the binding we want may be held by a syntactic environments such as CallObject or VarEnvrionmentObject.</p> + </dd> + <dt id="JSOP_GLOBALTHIS">JSOP_GLOBALTHIS [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>186 (0xba)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code>this</code> value for current stack frame onto the stack. Emitted when <code>this</code> refers to the global <code>this</code>.</p> + </dd> + <dt id="JSOP_IMPLICITTHIS">JSOP_IMPLICITTHIS [-0, +1] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>226 (0xe2)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>this</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the implicit <code>this</code> value for calls to the associated name onto the stack.</p> + </dd> +</dl> + +<h4 id="Super">Super</h4> + +<dl> + <dt id="JSOP_SUPERBASE">JSOP_SUPERBASE [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>103 (0x67)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>homeObjectProto</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the prototype of the home object for |callee| onto the stack.</p> + </dd> + <dt id="JSOP_SUPERFUN">JSOP_SUPERFUN [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>164 (0xa4)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>callee</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>superFun</code></td> + </tr> + </tbody> + </table> + + <p>Push the function to invoke with |super()|. This is the prototype of the function passed in as |callee|.</p> + </dd> +</dl> + +<h4 id="Arguments">Arguments</h4> + +<dl> + <dt id="JSOP_ARGUMENTS">JSOP_ARGUMENTS [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>9 (0x09)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>arguments</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the <code>arguments</code> object for the current function activation.</p> + + <p>If <code><code>JSS</code>cript</code> is not marked <code>needsArgsObj</code>, then a <code>JS_OPTIMIZED_ARGUMENTS</code> magic value is pushed. Otherwise, a proper arguments object is constructed and pushed.</p> + + <p>This opcode requires that the function does not have rest parameter.</p> + </dd> + <dt id="JSOP_CALLEE">JSOP_CALLEE [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>132 (0x84)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>callee</code></td> + </tr> + </tbody> + </table> + + <p>Pushes current callee onto the stack.</p> + + <p>Used for named function expression self-naming, if lightweight.</p> + </dd> + <dt id="JSOP_ENVCALLEE">JSOP_ENVCALLEE [-0, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>206 (0xce)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t numHops</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>callee</code></td> + </tr> + </tbody> + </table> + + <p>Load the callee stored in a CallObject on the environment chain. The numHops operand is the number of environment objects to skip on the environment chain.</p> + </dd> + <dt id="JSOP_GETARG">JSOP_GETARG [-0, +1] (QARG, NAME)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>84 (0x54)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>arguments[argno]</code></td> + </tr> + </tbody> + </table> + + <p>Fast get op for function arguments and local variables.</p> + + <p>Pushes <code>arguments[argno]</code> onto the stack.</p> + </dd> + <dt id="JSOP_NEWTARGET">JSOP_NEWTARGET [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>148 (0x94)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>new.target</code></td> + </tr> + </tbody> + </table> + + <p>Push "new.target"</p> + </dd> + <dt id="JSOP_REST">JSOP_REST [-0, +1] (TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>224 (0xe0)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rest</code></td> + </tr> + </tbody> + </table> + + <p>Creates rest parameter array for current function call, and pushes it onto the stack.</p> + </dd> + <dt id="JSOP_SETARG">JSOP_SETARG [-1, +1] (QARG, NAME)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>85 (0x55)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t argno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Fast set op for function arguments and local variables.</p> + + <p>Sets <code>arguments[argno]</code> as the top of stack value.</p> + </dd> +</dl> + +<h4 id="Var_Scope">Var Scope</h4> + +<dl> + <dt id="JSOP_POPVARENV">JSOP_POPVARENV [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>181 (0xb5)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops a var environment from the env chain.</p> + </dd> + <dt id="JSOP_PUSHVARENV">JSOP_PUSHVARENV [-0, +0] (SCOPE)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>180 (0xb4)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t scopeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pushes a var environment onto the env chain.</p> + </dd> +</dl> + +<h4 id="Modules">Modules</h4> + +<dl> + <dt id="JSOP_DYNAMIC_IMPORT">JSOP_DYNAMIC_IMPORT [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>233 (0xe9)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>arg</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>rval</code></td> + </tr> + </tbody> + </table> + + <p>Dynamic import of the module specified by the string value on the top of the stack.</p> + </dd> + <dt id="JSOP_IMPORTMETA">JSOP_IMPORTMETA [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>232 (0xe8)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>import.meta</code></td> + </tr> + </tbody> + </table> + + <p>Push "import.meta"</p> + </dd> +</dl> + +<h3 id="Operators">Operators</h3> + +<h4 id="Comparison_Operators">Comparison Operators</h4> + +<dl> + <dt id="JSOP_EQ">JSOP_EQ [-2, +1] (DETECTING, IC)<br> + JSOP_GE [-2, +1] (IC)<br> + JSOP_GT [-2, +1] (IC)<br> + JSOP_LE [-2, +1] (IC)<br> + JSOP_LT [-2, +1] (IC)<br> + JSOP_NE [-2, +1] (DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_EQ: 18 (0x12)<br> + JSOP_GE: 23 (0x17)<br> + JSOP_GT: 22 (0x16)<br> + JSOP_LE: 21 (0x15)<br> + JSOP_LT: 20 (0x14)<br> + JSOP_NE: 19 (0x13)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval OP rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values from the stack and pushes the result of comparing them.</p> + </dd> + <dt id="JSOP_STRICTEQ">JSOP_STRICTEQ [-2, +1] (DETECTING, IC)<br> + JSOP_STRICTNE [-2, +1] (DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_STRICTEQ: 72 (0x48)<br> + JSOP_STRICTNE: 73 (0x49)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval OP rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values from the stack, then pushes the result of applying the operator to the two values.</p> + </dd> +</dl> + +<h4 id="Arithmetic_Operators">Arithmetic Operators</h4> + +<dl> + <dt id="JSOP_ADD">JSOP_ADD [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>27 (0x1b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval + rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes the result of <code>lval + rval</code>.</p> + </dd> + <dt id="JSOP_DEC">JSOP_DEC [-1, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>235 (0xeb)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(val - 1)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the numeric value <code>val</code> from the stack, then pushes <code>val - 1</code>.</p> + </dd> + <dt id="JSOP_INC">JSOP_INC [-1, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>234 (0xea)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(val + 1)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the numeric value <code>val</code> from the stack, then pushes <code>val + 1</code>.</p> + </dd> + <dt id="JSOP_DIV">JSOP_DIV [-2, +1] (IC)<br> + JSOP_MOD [-2, +1] (IC)<br> + JSOP_MUL [-2, +1] (IC)<br> + JSOP_SUB [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_DIV: 30 (0x1e)<br> + JSOP_MOD: 31 (0x1f)<br> + JSOP_MUL: 29 (0x1d)<br> + JSOP_SUB: 28 (0x1c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval OP rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes the result of applying the arithmetic operation to them.</p> + </dd> + <dt id="JSOP_NEG">JSOP_NEG [-1, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>34 (0x22)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(-val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the value <code>val</code> from the stack, then pushes <code>-val</code>.</p> + </dd> + <dt id="JSOP_POS">JSOP_POS [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>35 (0x23)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(+val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the value <code>val</code> from the stack, then pushes <code>+val</code>. (<code>+val</code> is the value converted to a number.)</p> + </dd> + <dt id="JSOP_POW">JSOP_POW [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>150 (0x96)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval ** rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes the result of <code>Math.pow(lval, rval)</code>.</p> + </dd> + <dt id="JSOP_TONUMERIC">JSOP_TONUMERIC [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>236 (0xec)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>ToNumeric(val)</code></td> + </tr> + </tbody> + </table> + + <p>Pop <code>val</code> from the stack, then push the result of <code>ToNumeric(val)</code>.</p> + </dd> +</dl> + +<h4 id="Bitwise_Logical_Operators">Bitwise Logical Operators</h4> + +<dl> + <dt id="JSOP_BITAND">JSOP_BITAND [-2, +1] (IC)<br> + JSOP_BITOR [-2, +1] (IC)<br> + JSOP_BITXOR [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_BITAND: 17 (0x11)<br> + JSOP_BITOR: 15 (0x0f)<br> + JSOP_BITXOR: 16 (0x10)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval OP rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes the result of the operation applied to the two operands, converting both to 32-bit signed integers if necessary.</p> + </dd> + <dt id="JSOP_BITNOT">JSOP_BITNOT [-1, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>33 (0x21)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(~val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the value <code>val</code> from the stack, then pushes <code>~val</code>.</p> + </dd> +</dl> + +<h4 id="Bitwise_Shift_Operators">Bitwise Shift Operators</h4> + +<dl> + <dt id="JSOP_LSH">JSOP_LSH [-2, +1] (IC)<br> + JSOP_RSH [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_LSH: 24 (0x18)<br> + JSOP_RSH: 25 (0x19)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval OP rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes the result of the operation applied to the operands.</p> + </dd> + <dt id="JSOP_URSH">JSOP_URSH [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>26 (0x1a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>lval, rval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(lval >>> rval)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>lval</code> and <code>rval</code> from the stack, then pushes <code>lval >>> rval</code>.</p> + </dd> +</dl> + +<h4 id="Logical_Operators">Logical Operators</h4> + +<dl> + <dt id="JSOP_NOT">JSOP_NOT [-1, +1] (DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>32 (0x20)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(!val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the value <code>val</code> from the stack, then pushes <code>!val</code>.</p> + </dd> +</dl> + +<h4 id="Special_Operators">Special Operators</h4> + +<dl> + <dt id="JSOP_DELELEM">JSOP_DELELEM [-2, +1] (ELEM, CHECKSLOPPY)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>38 (0x26)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>propval</code> and <code>obj</code>, deletes <code>propval</code> property from <code>obj</code>, pushes <code>true</code> onto the stack if succeeded, <code>false</code> if not.</p> + </dd> + <dt id="JSOP_DELPROP">JSOP_DELPROP [-1, +1] (ATOM, PROP, CHECKSLOPPY)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>37 (0x25)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, deletes property from it, pushes <code>true</code> onto the stack if succeeded, <code>false</code> if not.</p> + </dd> + <dt id="JSOP_IN">JSOP_IN [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>113 (0x71)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>id, obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(id in obj)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>id</code> and <code>obj</code> from the stack, then pushes <code>id in obj</code>. This will throw a <code>TypeError</code> if <code>obj</code> is not an object.</p> + + <p>Note that <code>obj</code> is the top value.</p> + </dd> + <dt id="JSOP_INSTANCEOF">JSOP_INSTANCEOF [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>114 (0x72)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, ctor</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(obj instanceof ctor)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>obj</code> and <code>ctor</code> from the stack, then pushes <code>obj instanceof ctor</code>. This will throw a <code>TypeError</code> if <code>obj</code> is not an object.</p> + </dd> + <dt id="JSOP_STRICTDELPROP">JSOP_STRICTDELPROP [-1, +1] (ATOM, PROP, CHECKSTRICT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>46 (0x2e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value and attempts to delete the given property from it. Pushes <code>true</code> onto success, else throws a TypeError per strict mode property-deletion requirements.</p> + </dd> + <dt id="JSOP_TYPEOF">JSOP_TYPEOF [-1, +1] (DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>39 (0x27)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(typeof val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the value <code>val</code> from the stack, then pushes <code>typeof val</code>.</p> + </dd> + <dt id="JSOP_TYPEOFEXPR">JSOP_TYPEOFEXPR [-1, +1] (DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>196 (0xc4)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(typeof val)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top stack value as <code>val</code> and pushes <code>typeof val</code>. Note that this opcode isn't used when, in the original source code, <code>val</code> is a name -- see <code><code>JSOP_TYPEOF</code></code> for that. (This is because <code>typeof undefinedName === "undefined"</code>.)</p> + </dd> + <dt id="JSOP_VOID">JSOP_VOID [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>40 (0x28)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>undefined</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top value on the stack and pushes <code>undefined</code>.</p> + </dd> +</dl> + +<h4 id="Stack_Operations">Stack Operations</h4> + +<dl> + <dt id="JSOP_DUP">JSOP_DUP [-1, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>12 (0x0c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v, v</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a copy of the top value on the stack.</p> + </dd> + <dt id="JSOP_DUP2">JSOP_DUP2 [-2, +4]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>13 (0x0d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v1, v2</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v1, v2, v1, v2</code></td> + </tr> + </tbody> + </table> + + <p>Duplicates the top two values on the stack.</p> + </dd> + <dt id="JSOP_DUPAT">JSOP_DUPAT [-0, +1] (UINT24)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>44 (0x2c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t n</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v[n], v[n-1], ..., v[1], v[0]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v[n], v[n-1], ..., v[1], v[0], v[n]</code></td> + </tr> + </tbody> + </table> + + <p>Duplicates the Nth value from the top onto the stack.</p> + </dd> + <dt id="JSOP_PICK">JSOP_PICK [-0, +0] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>133 (0x85)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t n</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v[n], v[n-1], ..., v[1], v[0]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v[n-1], ..., v[1], v[0], v[n]</code></td> + </tr> + </tbody> + </table> + + <p>Picks the nth element from the stack and moves it to the top of the stack.</p> + </dd> + <dt id="JSOP_POP">JSOP_POP [-1, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>81 (0x51)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top value off the stack.</p> + </dd> + <dt id="JSOP_POPN">JSOP_POPN [-n, +0] (UINT16)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>11 (0x0b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t n</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v[n-1], ..., v[1], v[0]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Pops the top <code>n</code> values from the stack.</p> + </dd> + <dt id="JSOP_SWAP">JSOP_SWAP [-2, +2]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>10 (0x0a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v1, v2</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v2, v1</code></td> + </tr> + </tbody> + </table> + + <p>Swaps the top two values on the stack. This is useful for things like post-increment/decrement.</p> + </dd> + <dt id="JSOP_UNPICK">JSOP_UNPICK [-0, +0] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>183 (0xb7)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t n</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>v[n], v[n-1], ..., v[1], v[0]</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v[0], v[n], v[n-1], ..., v[1]</code></td> + </tr> + </tbody> + </table> + + <p>Moves the top of the stack value under the nth element of the stack. Note: n must NOT be 0.</p> + </dd> +</dl> + +<h4 id="Debugger_2">Debugger</h4> + +<dl> + <dt id="JSOP_DEBUGAFTERYIELD">JSOP_DEBUGAFTERYIELD [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>208 (0xd0)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Bytecode emitted after <code>yield</code> expressions to help the Debugger fix up the frame in the JITs. No-op in the interpreter.</p> + </dd> +</dl> + +<h3 id="Literals">Literals</h3> + +<h4 id="Constants">Constants</h4> + +<dl> + <dt id="JSOP_BIGINT">JSOP_BIGINT [-0, +1] (BIGINT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>237 (0xed)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t constIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a BigInt constant onto the stack.</p> + </dd> + <dt id="JSOP_BUILTINPROTO">JSOP_BUILTINPROTO [-0, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>221 (0xdd)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t kind</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>%BuiltinPrototype%</code></td> + </tr> + </tbody> + </table> + + <p>Pushes the current global's builtin prototype for a given proto key.</p> + </dd> + <dt id="JSOP_DOUBLE">JSOP_DOUBLE [-0, +1] (DOUBLE)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>60 (0x3c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>DoubleValue literal</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>9</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes numeric constant onto the stack.</p> + </dd> + <dt id="JSOP_FALSE">JSOP_FALSE [-0, +1]<br> + JSOP_TRUE [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>JSOP_FALSE: 66 (0x42)<br> + JSOP_TRUE: 67 (0x43)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>true/false</code></td> + </tr> + </tbody> + </table> + + <p>Pushes boolean value onto the stack.</p> + </dd> + <dt id="JSOP_INT32">JSOP_INT32 [-0, +1] (INT32)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>216 (0xd8)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int32_t val</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes 32-bit int immediate integer operand onto the stack.</p> + </dd> + <dt id="JSOP_INT8">JSOP_INT8 [-0, +1] (INT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>215 (0xd7)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>int8_t val</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes 8-bit int immediate integer operand onto the stack.</p> + </dd> + <dt id="JSOP_IS_CONSTRUCTING">JSOP_IS_CONSTRUCTING [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>65 (0x41)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>JS_IS_CONSTRUCTING</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code><code>JS_IS_CONSTRUCTING</code></code></p> + </dd> + <dt id="JSOP_NULL">JSOP_NULL [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>64 (0x40)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>null</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code>null</code> onto the stack.</p> + </dd> + <dt id="JSOP_ONE">JSOP_ONE [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>63 (0x3f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>1</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code>1</code> onto the stack.</p> + </dd> + <dt id="JSOP_STRING">JSOP_STRING [-0, +1] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>61 (0x3d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t atomIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>atom</code></td> + </tr> + </tbody> + </table> + + <p>Pushes string constant onto the stack.</p> + </dd> + <dt id="JSOP_SYMBOL">JSOP_SYMBOL [-0, +1] (UINT8)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>45 (0x2d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint8_t symbol (the JS::SymbolCode of the symbol to use)</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>2</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>symbol</code></td> + </tr> + </tbody> + </table> + + <p>Push a well-known symbol onto the operand stack.</p> + </dd> + <dt id="JSOP_UINT16">JSOP_UINT16 [-0, +1] (UINT16)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>88 (0x58)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint16_t val</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>3</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes unsigned 16-bit int immediate integer operand onto the stack.</p> + </dd> + <dt id="JSOP_UINT24">JSOP_UINT24 [-0, +1] (UINT24)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>188 (0xbc)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t val</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pushes unsigned 24-bit int immediate integer operand onto the stack.</p> + </dd> + <dt id="JSOP_UNDEFINED">JSOP_UNDEFINED [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>1 (0x01)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>undefined</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code>undefined</code> onto the stack.</p> + </dd> + <dt id="JSOP_UNINITIALIZED">JSOP_UNINITIALIZED [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>142 (0x8e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>uninitialized</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a <code>JS_UNINITIALIZED_LEXICAL</code> value onto the stack, representing an uninitialized lexical binding.</p> + + <p>This opcode is used with the <code>JSOP_INITLEXICAL</code> opcode.</p> + </dd> + <dt id="JSOP_ZERO">JSOP_ZERO [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>62 (0x3e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>0</code></td> + </tr> + </tbody> + </table> + + <p>Pushes <code>0</code> onto the stack.</p> + </dd> +</dl> + +<h4 id="Object">Object</h4> + +<dl> + <dt id="JSOP_CALLELEM">JSOP_CALLELEM [-2, +1] (ELEM, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>193 (0xc1)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[propval]</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>propval</code> and <code>obj</code>, pushes <code>propval</code> property of <code>obj</code> onto the stack. Requires the value under <code>obj</code> to be the receiver of the following call.</p> + + <p>Like <code>JSOP_GETELEM</code> but for call context.</p> + </dd> + <dt id="JSOP_CALLPROP">JSOP_CALLPROP [-1, +1] (ATOM, PROP, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>184 (0xb8)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[name]</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, pushes property of it onto the stack. Requires the value under <code>obj</code> to be the receiver of the following call.</p> + + <p>Like <code>JSOP_GETPROP</code> but for call context.</p> + </dd> + <dt id="JSOP_CALLSITEOBJ">JSOP_CALLSITEOBJ [-0, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>101 (0x65)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t objectIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes 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.</p> + </dd> + <dt id="JSOP_CHECKCLASSHERITAGE">JSOP_CHECKCLASSHERITAGE [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>51 (0x33)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>heritage</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>heritage</code></td> + </tr> + </tbody> + </table> + + <p>Ensures the result of a class's heritage expression is either null or a constructor.</p> + </dd> + <dt id="JSOP_CHECKOBJCOERCIBLE">JSOP_CHECKOBJCOERCIBLE [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>163 (0xa3)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Throw if the value on the stack is not coerscible to an object (is |null| or |undefined|).</p> + </dd> + <dt id="JSOP_GETBOUNDNAME">JSOP_GETBOUNDNAME [-1, +1] (ATOM, NAME, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>195 (0xc3)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>env</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>v</code></td> + </tr> + </tbody> + </table> + + <p>Pops 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.</p> + </dd> + <dt id="JSOP_GETELEM">JSOP_GETELEM [-2, +1] (ELEM, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>55 (0x37)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[propval]</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>propval</code> and <code>obj</code>, pushes <code>propval</code> property of <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_GETELEM_SUPER">JSOP_GETELEM_SUPER [-3, +1] (ELEM, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>125 (0x7d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, propval, obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[propval]</code></td> + </tr> + </tbody> + </table> + + <p>LIKE <code>JSOP_GETELEM</code> but takes receiver on stack, and the propval is evaluated before the obj.</p> + </dd> + <dt id="JSOP_GETPROP">JSOP_GETPROP [-1, +1] (ATOM, PROP, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>53 (0x35)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[name]</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, pushes property of it onto the stack.</p> + </dd> + <dt id="JSOP_GETPROP_SUPER">JSOP_GETPROP_SUPER [-2, +1] (ATOM, PROP, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>104 (0x68)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj[name]</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values, and pushes the property of one, using the other as the receiver.</p> + </dd> + <dt id="JSOP_INITELEM">JSOP_INITELEM [-3, +1] (ELEM, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>94 (0x5e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a numeric property in an object literal, like <code>{1: x}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITELEM_GETTER">JSOP_INITELEM_GETTER [-3, +1] (ELEM, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>99 (0x63)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a numeric getter in an object literal like <code>{get 2() {}}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> getter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITELEM_SETTER">JSOP_INITELEM_SETTER [-3, +1] (ELEM, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>100 (0x64)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a numeric setter in an object literal like <code>{set 2(v) {}}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> setter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENELEM">JSOP_INITHIDDENELEM [-3, +1] (ELEM, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>175 (0xaf)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable numeric property in an object literal, like <code>{1: x}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENELEM_GETTER">JSOP_INITHIDDENELEM_GETTER [-3, +1] (ELEM, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>173 (0xad)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable numeric getter in an object literal like <code>{get 2() {}}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> getter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENELEM_SETTER">JSOP_INITHIDDENELEM_SETTER [-3, +1] (ELEM, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>174 (0xae)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, id, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable numeric setter in an object literal like <code>{set 2(v) {}}</code>.</p> + + <p>Pops the top three values on the stack as <code>val</code>, <code>id</code> and <code>obj</code>, defines <code>id</code> setter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENPROP">JSOP_INITHIDDENPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>147 (0x93)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable data-property on an object.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines <code>nameIndex</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENPROP_GETTER">JSOP_INITHIDDENPROP_GETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>171 (0xab)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable getter in an object literal.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines getter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHIDDENPROP_SETTER">JSOP_INITHIDDENPROP_SETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>172 (0xac)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-enumerable setter in an object literal.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines setter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITHOMEOBJECT">JSOP_INITHOMEOBJECT [-2, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>92 (0x5c)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>fun, homeObject</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>fun</code></td> + </tr> + </tbody> + </table> + + <p>Initialize the home object for functions with super bindings.</p> + + <p>This opcode takes the function and the object to be the home object, does the set, and leaves the function on the stack.</p> + </dd> + <dt id="JSOP_INITLOCKEDPROP">JSOP_INITLOCKEDPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>146 (0x92)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a non-configurable, non-writable, non-enumerable data-property on an object.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines <code>nameIndex</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITPROP">JSOP_INITPROP [-2, +1] (ATOM, PROP, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>93 (0x5d)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a named property in an object literal, like <code>{a: x}</code>.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines <code>nameIndex</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITPROP_GETTER">JSOP_INITPROP_GETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>97 (0x61)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a getter in an object literal.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines getter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITPROP_SETTER">JSOP_INITPROP_SETTER [-2, +1] (ATOM, PROP, PROPINIT, DETECTING)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>98 (0x62)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize a setter in an object literal.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, defines setter of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_MUTATEPROTO">JSOP_MUTATEPROTO [-2, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>194 (0xc2)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, newProto</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p><code>__proto__: v</code> inside an object initializer.</p> + + <p>Pops the top two values on the stack as <code>newProto</code> and <code>obj</code>, sets prototype of <code>obj</code> as <code>newProto</code>, pushes <code>true</code> onto the stack if succeeded, <code>false</code> if not.</p> + </dd> + <dt id="JSOP_NEWINIT">JSOP_NEWINIT [-0, +1] (UINT32, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>89 (0x59)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>(uint32_t extra)</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes newly created object onto the stack.</p> + + <p>This opcode has four extra bytes so it can be exchanged with <code>JSOP_NEWOBJECT</code> during emit.</p> + </dd> + <dt id="JSOP_NEWOBJECT">JSOP_NEWOBJECT [-0, +1] (OBJECT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>91 (0x5b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t baseobjIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes newly created object onto the stack.</p> + + <p>This opcode takes an object with the final shape, which can be set at the start and slots then filled in directly.</p> + </dd> + <dt id="JSOP_OBJECT">JSOP_OBJECT [-0, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>80 (0x50)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t objectIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes deep-cloned object literal or singleton onto the stack.</p> + </dd> + <dt id="JSOP_OBJWITHPROTO">JSOP_OBJWITHPROTO [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>83 (0x53)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>proto</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes newly created object onto the stack with provided [[Prototype]].</p> + </dd> + <dt id="JSOP_SETELEM">JSOP_SETELEM [-3, +1] (ELEM, PROPSET, DETECTING, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>56 (0x38)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top three values on the stack as <code>val</code>, <code>propval</code> and <code>obj</code>, sets <code>propval</code> property of <code>obj</code> as <code>val</code>, pushes <code>val</code> onto the stack.</p> + </dd> + <dt id="JSOP_SETELEM_SUPER">JSOP_SETELEM_SUPER [-4, +1] (ELEM, PROPSET, DETECTING, CHECKSLOPPY)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>158 (0x9e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, propval, obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>LIKE <code>JSOP_SETELEM</code>, but takes receiver on the stack, and the propval is evaluated before the base.</p> + </dd> + <dt id="JSOP_SETPROP">JSOP_SETPROP [-2, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSLOPPY, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>54 (0x36)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code> and performs <code>obj.prop = val</code>, pushing <code>val</code> back onto the stack.</p> + </dd> + <dt id="JSOP_SETPROP_SUPER">JSOP_SETPROP_SUPER [-3, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSLOPPY)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>107 (0x6b)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top three values on the stack as <code>val</code>, <code>obj</code> and <code>receiver</code>, and performs <code>obj.prop = val</code>, pushing <code>val</code> back onto the stack.</p> + </dd> + <dt id="JSOP_STRICTDELELEM">JSOP_STRICTDELELEM [-2, +1] (ELEM, CHECKSTRICT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>47 (0x2f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>succeeded</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>propval</code> and <code>obj</code>, and attempts to delete <code>propval</code> property from <code>obj</code>. Pushes <code>true</code> onto the stack on success, else throws a TypeError per strict mode property deletion requirements.</p> + </dd> + <dt id="JSOP_STRICTSETELEM">JSOP_STRICTSETELEM [-3, +1] (ELEM, PROPSET, DETECTING, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>57 (0x39)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, propval, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top three values on the stack as <code>val</code>, <code>propval</code> and <code>obj</code>, sets <code>propval</code> property of <code>obj</code> as <code>val</code>, pushes <code>val</code> onto the stack. Throws a TypeError if the set fails, per strict mode semantics.</p> + </dd> + <dt id="JSOP_STRICTSETELEM_SUPER">JSOP_STRICTSETELEM_SUPER [-4, +1] (ELEM, PROPSET, DETECTING, CHECKSTRICT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>159 (0x9f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, propval, obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>LIKE <code>JSOP_STRICTSETELEM</code>, but takes receiver on the stack, and the propval is evaluated before the base.</p> + </dd> + <dt id="JSOP_STRICTSETPROP">JSOP_STRICTSETPROP [-2, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSTRICT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>48 (0x30)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, and performs <code>obj.prop = val</code>, pushing <code>val</code> back onto the stack. Throws a TypeError if the set-operation failed (per strict mode semantics).</p> + </dd> + <dt id="JSOP_STRICTSETPROP_SUPER">JSOP_STRICTSETPROP_SUPER [-3, +1] (ATOM, PROP, PROPSET, DETECTING, CHECKSTRICT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>105 (0x69)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>receiver, obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top three values on the stack as <code>val</code> and <code>obj</code>, and <code>receiver</code>, and performs <code>obj.prop = val</code>, pushing <code>val</code> back onto the stack. Throws a TypeError if the set-operation failed (per strict mode semantics).</p> + </dd> + <dt id="JSOP_TOID">JSOP_TOID [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>225 (0xe1)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>propertyNameValue</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>propertyKey</code></td> + </tr> + </tbody> + </table> + + <p>Replace the top-of-stack value propertyNameValue with ToPropertyKey(propertyNameValue).</p> + </dd> +</dl> + +<h4 id="Array">Array</h4> + +<dl> + <dt id="JSOP_HOLE">JSOP_HOLE [-0, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>218 (0xda)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>hole</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a <code>JS_ELEMENTS_HOLE</code> value onto the stack, representing an omitted property in an array literal (e.g. property 0 in the array <code>[, 1]</code>).</p> + + <p>This opcode is used with the <code>JSOP_NEWARRAY</code> opcode.</p> + </dd> + <dt id="JSOP_INITELEM_ARRAY">JSOP_INITELEM_ARRAY [-2, +1] (UINT32, ELEM, PROPINIT, DETECTING, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>96 (0x60)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t index</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Initialize an array element.</p> + + <p>Pops the top two values on the stack as <code>val</code> and <code>obj</code>, sets <code>index</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> onto the stack.</p> + </dd> + <dt id="JSOP_INITELEM_INC">JSOP_INITELEM_INC [-3, +2] (ELEM, PROPINIT, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>95 (0x5f)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj, index, val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj, (index + 1)</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top three values on the stack as <code>val</code>, <code>index</code> and <code>obj</code>, sets <code>index</code> property of <code>obj</code> as <code>val</code>, pushes <code>obj</code> and <code>index + 1</code> onto the stack.</p> + + <p>This opcode is used in Array literals with spread and spreadcall arguments.</p> + </dd> + <dt id="JSOP_LENGTH">JSOP_LENGTH [-1, +1] (ATOM, PROP, TYPESET, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>217 (0xd9)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t nameIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj['length']</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top of stack value, pushes the <code>length</code> property of it onto the stack.</p> + </dd> + <dt id="JSOP_NEWARRAY">JSOP_NEWARRAY [-0, +1] (UINT32, IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>90 (0x5a)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t length</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes newly created array onto the stack.</p> + + <p>This opcode takes the final length, which is preallocated.</p> + </dd> + <dt id="JSOP_NEWARRAY_COPYONWRITE">JSOP_NEWARRAY_COPYONWRITE [-0, +1] (OBJECT)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>102 (0x66)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t objectIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>obj</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a newly created array onto the stack, whose elements are the same as that of a template object's copy on write elements.</p> + </dd> +</dl> + +<h4 id="RegExp">RegExp</h4> + +<dl> + <dt id="JSOP_REGEXP">JSOP_REGEXP [-0, +1] (REGEXP)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>160 (0xa0)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t regexpIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>regexp</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a regular expression literal onto the stack. It requires special "clone on exec" handling.</p> + </dd> +</dl> + +<h4 id="Class">Class</h4> + +<dl> + <dt id="JSOP_CLASSCONSTRUCTOR">JSOP_CLASSCONSTRUCTOR [-0, +1] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>167 (0xa7)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>atom className</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>constructor</code></td> + </tr> + </tbody> + </table> + + <p>Push a default constructor for a base class literal.</p> + </dd> + <dt id="JSOP_DERIVEDCONSTRUCTOR">JSOP_DERIVEDCONSTRUCTOR [-1, +1] (ATOM)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>168 (0xa8)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>atom className</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>proto</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>constructor</code></td> + </tr> + </tbody> + </table> + + <p>Push a default constructor for a derived class literal.</p> + </dd> +</dl> + +<h3 id="Other">Other</h3> + +<dl> + <dt id="JSOP_DEBUGCHECKSELFHOSTED">JSOP_DEBUGCHECKSELFHOSTED [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>177 (0xb1)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>checkVal</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>checkVal</code></td> + </tr> + </tbody> + </table> + + <p>Examines 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.</p> + </dd> + <dt id="JSOP_FORCEINTERPRETER">JSOP_FORCEINTERPRETER [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>207 (0xcf)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>No-op bytecode only emitted in some self-hosted functions. Not handled by the JITs so the script always runs in the interpreter.</p> + </dd> + <dt id="JSOP_HASOWN">JSOP_HASOWN [-2, +1] (IC)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>211 (0xd3)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>id, obj</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>(obj.hasOwnProperty(id))</code></td> + </tr> + </tbody> + </table> + + <p>Pops the top two values <code>id</code> and <code>obj</code> from the stack, then pushes obj.hasOwnProperty(id)</p> + + <p>Note that <code>obj</code> is the top value.</p> + </dd> + <dt id="JSOP_ITERNEXT">JSOP_ITERNEXT [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>222 (0xde)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>val</code></td> + </tr> + </tbody> + </table> + + <p>NOP opcode to hint to IonBuilder that the value on top of the stack is the (likely string) key in a for-in loop.</p> + </dd> + <dt id="JSOP_JUMPTARGET">JSOP_JUMPTARGET [-0, +0] (ICINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>230 (0xe6)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t icIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>This opcode is a no-op and it indicates the location of a jump instruction target. Some other opcodes act as jump targets as well, see BytecodeIsJumpTarget. The IC index is used by the Baseline interpreter.</p> + </dd> + <dt id="JSOP_LINENO">JSOP_LINENO [-0, +0] (UINT32)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>119 (0x77)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint32_t lineno</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>5</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>Embedded lineno to speedup <code>pc->line</code> mapping.</p> + </dd> + <dt id="JSOP_NOP">JSOP_NOP [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>0 (0x00)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>No operation is performed.</p> + </dd> + <dt id="JSOP_NOP_DESTRUCTURING">JSOP_NOP_DESTRUCTURING [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>229 (0xe5)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>No-op used by the decompiler to produce nicer error messages about destructuring code.</p> + </dd> + <dt id="JSOP_RESUMEINDEX">JSOP_RESUMEINDEX [-0, +1] (RESUMEINDEX)</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>126 (0x7e)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code>uint24_t resumeIndex</code></td> + </tr> + <tr> + <th>Length</th> + <td><code>4</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>resumeIndex</code></td> + </tr> + </tbody> + </table> + + <p>Pushes a resumeIndex (stored as 24-bit operand) on the stack.</p> + + <p>Resume indexes are used for ops like <code>JSOP_YIELD</code> and <code>JSOP_GOSUB</code>. <code>JSS</code>cript and BaselineScript have lists of resume entries (one for each resumeIndex); this lets the JIT resume at these ops from JIT code.</p> + </dd> + <dt id="JSOP_TOSTRING">JSOP_TOSTRING [-1, +1]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>228 (0xe4)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code>val</code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code>ToString(val)</code></td> + </tr> + </tbody> + </table> + + <p>Converts the value on the top of the stack to a String.</p> + </dd> + <dt id="JSOP_TRY_DESTRUCTURING">JSOP_TRY_DESTRUCTURING [-0, +0]</dt> + <dd> + <table class="standard-table"> + <tbody> + <tr> + <th>Value</th> + <td><code>220 (0xdc)</code></td> + </tr> + <tr> + <th>Operands</th> + <td><code> </code></td> + </tr> + <tr> + <th>Length</th> + <td><code>1</code></td> + </tr> + <tr> + <th>Stack Uses</th> + <td><code> </code></td> + </tr> + <tr> + <th>Stack Defs</th> + <td><code> </code></td> + </tr> + </tbody> + </table> + + <p>No-op used by the exception unwinder to determine the correct environment to unwind to when performing IteratorClose due to destructuring.</p> + </dd> +</dl> |