diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-24 12:09:30 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-24 12:09:30 +0100 |
commit | 7d753c1a8f22f85f6279a3c016034ce8f8e740f7 (patch) | |
tree | 7d3dba690a5689a04d4f2c2b544accaf8621634a /js/src/frontend/BytecodeEmitter.h | |
parent | 2a57d73c3b5304be3f9be51018a1bbee79f007e2 (diff) | |
download | UXP-7d753c1a8f22f85f6279a3c016034ce8f8e740f7.tar UXP-7d753c1a8f22f85f6279a3c016034ce8f8e740f7.tar.gz UXP-7d753c1a8f22f85f6279a3c016034ce8f8e740f7.tar.lz UXP-7d753c1a8f22f85f6279a3c016034ce8f8e740f7.tar.xz UXP-7d753c1a8f22f85f6279a3c016034ce8f8e740f7.zip |
Bug 1147371: Implement IteratorClose for for-of
Issue #74
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.h')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h index 066c06672..6b39069de 100644 --- a/js/src/frontend/BytecodeEmitter.h +++ b/js/src/frontend/BytecodeEmitter.h @@ -679,6 +679,12 @@ struct MOZ_STACK_CLASS BytecodeEmitter // Pops iterator from the top of the stack. Pushes the result of |.next()| // onto the stack. MOZ_MUST_USE bool emitIteratorNext(ParseNode* pn, bool allowSelfHosted = false); + MOZ_MUST_USE bool emitIteratorClose( + mozilla::Maybe<JumpTarget> yieldStarTryStart = mozilla::Nothing(), + bool allowSelfHosted = false); + + template <typename InnerEmitter> + MOZ_MUST_USE bool wrapWithIteratorCloseTryNote(int32_t iterDepth, InnerEmitter emitter); // Check if the value on top of the stack is "undefined". If so, replace // that value on the stack with the value defined by |defaultExpr|. |