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
This commit is contained in:
FranklinDM 2022-04-28 14:49:07 +08:00 committed by roytam1
commit 4c35296690

View file

@ -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)
{
}