From fa72aef363d3e8b825024d389f3f3bf52ee38c07 Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Thu, 28 Apr 2022 14:49:07 +0800 Subject: Issue #1658 - Part 5: Add and initialize TDZ check to optional chaining emitter Partially based on: https://bugzilla.mozilla.org/show_bug.cgi?id=1685260 --- js/src/frontend/BytecodeEmitter.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/src') diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 82e248182b..0c6b1c9263 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -1995,6 +1995,8 @@ class MOZ_RAII OptionalEmitter private: BytecodeEmitter* bce_; + BytecodeEmitter::TDZCheckCache tdzCache_; + // Jump target for short circuiting code, which has null or undefined values. JumpList jumpShortCircuit_; @@ -12143,6 +12145,7 @@ BytecodeEmitter::copySrcNotes(jssrcnote* destination, uint32_t nsrcnotes) OptionalEmitter::OptionalEmitter(BytecodeEmitter* bce, int32_t initialDepth) : bce_(bce), + tdzCache_(bce), initialDepth_(initialDepth) { } -- cgit v1.2.3