Commit 30a2a31f authored by ishell@chromium.org's avatar ishell@chromium.org

HEnvironmentMarker factory added

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/32513002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d63c8e4d
......@@ -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_;
......
......@@ -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>(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>(HEnvironmentMarker::LOOKUP, index);
AddInstruction(lookup);
#ifdef DEBUG
lookup->set_closure(env->closure());
......
Markdown is supported
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