summaryrefslogtreecommitdiff
path: root/js/src/vm/Opcodes.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-01 19:14:11 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:24 -0500
commit3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4 (patch)
treed1f38e0fc9c35838279f191036741532c1657647 /js/src/vm/Opcodes.h
parentf07d5707c77e73031b6921faac165ca7f8d577c6 (diff)
downloaduxp-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.tar.gz
Bug 1343481 - Part 3: Add JSOP_AWAIT and rename {yieldIndex,yieldOffset} to {yieldAndAwaitIndex,yieldAndAwaitOffset}.
Tag #1287
Diffstat (limited to 'js/src/vm/Opcodes.h')
-rw-r--r--js/src/vm/Opcodes.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h
index 3c4d61a673..b446280808 100644
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -2055,7 +2055,7 @@
* interpretation.
* Category: Statements
* Type: Generator
- * Operands: uint24_t yieldIndex
+ * Operands: uint24_t yieldAndAwaitIndex
* Stack: generator =>
*/ \
macro(JSOP_INITIALYIELD, 202,"initialyield", NULL, 4, 1, 1, JOF_UINT24) \
@@ -2064,7 +2064,7 @@
* returns 'rval1'. Pushes sent value from 'send()' onto the stack.
* Category: Statements
* Type: Generator
- * Operands: uint24_t yieldIndex
+ * Operands: uint24_t yieldAndAwaitIndex
* Stack: rval1, gen => rval2
*/ \
macro(JSOP_YIELD, 203,"yield", NULL, 4, 2, 1, JOF_UINT24) \
@@ -2119,7 +2119,15 @@
* Stack: =>
*/ \
macro(JSOP_DEBUGAFTERYIELD, 208, "debugafteryield", NULL, 1, 0, 0, JOF_BYTE) \
- macro(JSOP_UNUSED209, 209, "unused209", NULL, 1, 0, 0, JOF_BYTE) \
+ /*
+ * Pops the generator and the return value 'result', stops interpretation
+ * and returns 'result'. Pushes resolved value onto the stack.
+ * Category: Statements
+ * Type: Generator
+ * Operands: uint24_t yieldAndAwaitIndex
+ * Stack: result, gen => resolved
+ */ \
+ macro(JSOP_AWAIT, 209, "await", NULL, 4, 2, 1, JOF_UINT24) \
macro(JSOP_UNUSED210, 210, "unused210", NULL, 1, 0, 0, JOF_BYTE) \
macro(JSOP_UNUSED211, 211, "unused211", NULL, 1, 0, 0, JOF_BYTE) \
/*