Reviewers: Benedikt Meurer,
Description:
HEnvironmentMarker factory added
Please review this at https://codereview.chromium.org/32513002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -4 lines):
M src/hydrogen-instructions.h
M src/hydrogen.h
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
696d8b00f8635fd98943df65da87ae3af511a982..79f22fe632d47e9ecd6669904115cedfdb9e3d11
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1774,8 +1774,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_; }
@@ -1802,6 +1801,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_;
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index
4159602e44b7ad11c029bbfd0102780614abcd0c..e456c1d9aa229494ebf50924507e71adfded7441
100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1918,7 +1918,7 @@ class HOptimizedGraphBuilder V8_FINAL
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());
@@ -1931,7 +1931,7 @@ class HOptimizedGraphBuilder V8_FINAL
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());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.