diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index de8e19a5fd..993f79c7f0 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -1776,8 +1776,7 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { public: enum Kind { BIND, LOOKUP }; - HEnvironmentMarker(Kind kind, int index) - : kind_(kind), index_(index), next_simulate_(NULL) { } + DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int); Kind kind() { return kind_; } int index() { return index_; } @@ -1804,6 +1803,9 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); private: + HEnvironmentMarker(Kind kind, int index) + : kind_(kind), index_(index), next_simulate_(NULL) { } + Kind kind_; int index_; HSimulate* next_simulate_; diff --git a/src/hydrogen.h b/src/hydrogen.h index edd92807de..e671692b3c 100644 --- a/src/hydrogen.h +++ b/src/hydrogen.h @@ -1948,7 +1948,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { env->Bind(index, value); if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { HEnvironmentMarker* bind = - new(zone()) HEnvironmentMarker(HEnvironmentMarker::BIND, index); + New(HEnvironmentMarker::BIND, index); AddInstruction(bind); #ifdef DEBUG bind->set_closure(env->closure()); @@ -1961,7 +1961,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { HValue* value = env->Lookup(index); if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { HEnvironmentMarker* lookup = - new(zone()) HEnvironmentMarker(HEnvironmentMarker::LOOKUP, index); + New(HEnvironmentMarker::LOOKUP, index); AddInstruction(lookup); #ifdef DEBUG lookup->set_closure(env->closure());