diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-12-01 19:14:11 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-12-17 06:25:24 -0500 |
commit | 3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4 (patch) | |
tree | d1f38e0fc9c35838279f191036741532c1657647 /js/src/frontend/BytecodeEmitter.h | |
parent | f07d5707c77e73031b6921faac165ca7f8d577c6 (diff) | |
download | UXP-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.tar UXP-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.tar.gz UXP-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.tar.lz UXP-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.tar.xz UXP-3a3de55aadd9d3a2aafc3638c7a9b0c23584cef4.zip |
Bug 1343481 - Part 3: Add JSOP_AWAIT and rename {yieldIndex,yieldOffset} to {yieldAndAwaitIndex,yieldAndAwaitOffset}.
Tag #1287
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.h')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h index 595ee6405..7f2dddfed 100644 --- a/js/src/frontend/BytecodeEmitter.h +++ b/js/src/frontend/BytecodeEmitter.h @@ -98,15 +98,15 @@ struct CGScopeNoteList { void finish(ScopeNoteArray* array, uint32_t prologueLength); }; -struct CGYieldOffsetList { +struct CGYieldAndAwaitOffsetList { Vector<uint32_t> list; uint32_t numYields; uint32_t numAwaits; - explicit CGYieldOffsetList(ExclusiveContext* cx) : list(cx), numYields(0), numAwaits(0) {} + explicit CGYieldAndAwaitOffsetList(ExclusiveContext* cx) : list(cx), numYields(0), numAwaits(0) {} MOZ_MUST_USE bool append(uint32_t offset) { return list.append(offset); } size_t length() const { return list.length(); } - void finish(YieldOffsetArray& array, uint32_t prologueLength); + void finish(YieldAndAwaitOffsetArray& array, uint32_t prologueLength); }; static size_t MaxBytecodeLength = INT32_MAX; @@ -237,10 +237,10 @@ struct MOZ_STACK_CLASS BytecodeEmitter CGScopeNoteList scopeNoteList; /* list of emitted block scope notes */ /* - * For each yield op, map the yield index (stored as bytecode operand) to - * the offset of the next op. + * For each yield or await op, map the yield and await index (stored as + * bytecode operand) to the offset of the next op. */ - CGYieldOffsetList yieldOffsetList; + CGYieldAndAwaitOffsetList yieldAndAwaitOffsetList; uint16_t typesetCount; /* Number of JOF_TYPESET opcodes generated */ |