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
This commit is contained in:
ishell@chromium.org 2013-10-21 14:18:55 +00:00
parent d63c8e4dc3
commit 30a2a31f14
2 changed files with 6 additions and 4 deletions

View File

@ -1776,8 +1776,7 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> {
public: public:
enum Kind { BIND, LOOKUP }; enum Kind { BIND, LOOKUP };
HEnvironmentMarker(Kind kind, int index) DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int);
: kind_(kind), index_(index), next_simulate_(NULL) { }
Kind kind() { return kind_; } Kind kind() { return kind_; }
int index() { return index_; } int index() { return index_; }
@ -1804,6 +1803,9 @@ class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker);
private: private:
HEnvironmentMarker(Kind kind, int index)
: kind_(kind), index_(index), next_simulate_(NULL) { }
Kind kind_; Kind kind_;
int index_; int index_;
HSimulate* next_simulate_; HSimulate* next_simulate_;

View File

@ -1948,7 +1948,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
env->Bind(index, value); env->Bind(index, value);
if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) {
HEnvironmentMarker* bind = HEnvironmentMarker* bind =
new(zone()) HEnvironmentMarker(HEnvironmentMarker::BIND, index); New<HEnvironmentMarker>(HEnvironmentMarker::BIND, index);
AddInstruction(bind); AddInstruction(bind);
#ifdef DEBUG #ifdef DEBUG
bind->set_closure(env->closure()); bind->set_closure(env->closure());
@ -1961,7 +1961,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
HValue* value = env->Lookup(index); HValue* value = env->Lookup(index);
if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) {
HEnvironmentMarker* lookup = HEnvironmentMarker* lookup =
new(zone()) HEnvironmentMarker(HEnvironmentMarker::LOOKUP, index); New<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index);
AddInstruction(lookup); AddInstruction(lookup);
#ifdef DEBUG #ifdef DEBUG
lookup->set_closure(env->closure()); lookup->set_closure(env->closure());