Commit 405fd343 authored by André Bargull's avatar André Bargull
Browse files

Bug 1685260: Add TDZCheckCache. r=yulia, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D100883
parent 420a1a63
...@@ -16,7 +16,7 @@ using namespace js; ...@@ -16,7 +16,7 @@ using namespace js;
using namespace js::frontend; using namespace js::frontend;
OptionalEmitter::OptionalEmitter(BytecodeEmitter* bce, int32_t initialDepth) OptionalEmitter::OptionalEmitter(BytecodeEmitter* bce, int32_t initialDepth)
: bce_(bce), initialDepth_(initialDepth) {} : bce_(bce), tdzCache_(bce), initialDepth_(initialDepth) {}
bool OptionalEmitter::emitJumpShortCircuit() { bool OptionalEmitter::emitJumpShortCircuit() {
MOZ_ASSERT(state_ == State::Start || state_ == State::ShortCircuit || MOZ_ASSERT(state_ == State::Start || state_ == State::ShortCircuit ||
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "frontend/IfEmitter.h" // IfEmitter, InternalIfEmitter, CondEmitter #include "frontend/IfEmitter.h" // IfEmitter, InternalIfEmitter, CondEmitter
#include "frontend/TDZCheckCache.h"
namespace js { namespace js {
namespace frontend { namespace frontend {
...@@ -146,6 +147,8 @@ class MOZ_RAII OptionalEmitter { ...@@ -146,6 +147,8 @@ class MOZ_RAII OptionalEmitter {
private: private:
BytecodeEmitter* bce_; BytecodeEmitter* bce_;
TDZCheckCache tdzCache_;
// jumptarget for ShortCircuiting code, which has null or undefined values // jumptarget for ShortCircuiting code, which has null or undefined values
JumpList jumpShortCircuit_; JumpList jumpShortCircuit_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment