Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index d06e3184f817f2849d6e53395e3bff72aa061621..dd3a339ee9ec2eb3ffae345df91d43e56bb44ba7 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -111,6 +111,8 @@ class LChunkBuilder; |
V(DummyUse) \ |
V(ElementsKind) \ |
V(EnterInlined) \ |
+ V(EnvironmentBind) \ |
+ V(EnvironmentLookup) \ |
V(FixedArrayBaseLength) \ |
V(ForceRepresentation) \ |
V(FunctionLiteral) \ |
@@ -1405,6 +1407,46 @@ class HDummyUse: public HTemplateInstruction<1> { |
}; |
+class HEnvironmentBind: public HTemplateInstruction<1> { |
+ public: |
+ explicit HEnvironmentBind(int index) |
+ : index_(index) { } |
+ |
+ int index() { return index_; } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) { |
+ return Representation::None(); |
+ } |
+ |
+ virtual void PrintDataTo(StringStream* stream); |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(EnvironmentBind); |
+ |
+ private: |
+ int index_; |
+}; |
+ |
+ |
+class HEnvironmentLookup: public HTemplateInstruction<1> { |
+ public: |
+ explicit HEnvironmentLookup(int index) |
+ : index_(index) { } |
+ |
+ int index() { return index_; } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) { |
+ return Representation::None(); |
+ } |
+ |
+ virtual void PrintDataTo(StringStream* stream); |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(EnvironmentLookup); |
+ |
+ private: |
+ int index_; |
+}; |
+ |
+ |
class HNumericConstraint : public HTemplateInstruction<2> { |
public: |
static HNumericConstraint* AddToGraph(HValue* constrained_value, |
@@ -1477,8 +1519,13 @@ class HDebugBreak: public HTemplateInstruction<0> { |
class HDeoptimize: public HControlInstruction { |
public: |
- HDeoptimize(int environment_length, Zone* zone) |
- : values_(environment_length, zone) { } |
+ HDeoptimize(int environment_length, |
+ int first_local_index, |
+ int first_expression_index, |
+ Zone* zone) |
+ : values_(environment_length, zone), |
+ first_local_index_(first_local_index), |
+ first_expression_index_(first_expression_index) { } |
virtual Representation RequiredInputRepresentation(int index) { |
return Representation::None(); |
@@ -1501,6 +1548,8 @@ class HDeoptimize: public HControlInstruction { |
values_.Add(NULL, zone); |
SetOperandAt(values_.length() - 1, value); |
} |
+ int first_local_index() { return first_local_index_; } |
+ int first_expression_index() { return first_expression_index_; } |
DECLARE_CONCRETE_INSTRUCTION(Deoptimize) |
@@ -1516,6 +1565,8 @@ class HDeoptimize: public HControlInstruction { |
private: |
ZoneList<HValue*> values_; |
+ int first_local_index_; |
+ int first_expression_index_; |
}; |
@@ -1827,6 +1878,12 @@ class HSimulate: public HInstruction { |
void AddPushedValue(HValue* value) { |
AddValue(kNoIndex, value); |
} |
+ int ToOperandIndex(int environment_index) { |
+ for (int i = 0; i < assigned_indexes_.length(); ++i) { |
+ if (assigned_indexes_[i] == environment_index) return i; |
+ } |
+ return -1; |
+ } |
virtual int OperandCount() { return values_.length(); } |
virtual HValue* OperandAt(int index) const { return values_[index]; } |
@@ -1920,7 +1977,8 @@ class HEnterInlined: public HTemplateInstruction<0> { |
InliningKind inlining_kind, |
Variable* arguments_var, |
ZoneList<HValue*>* arguments_values, |
- bool undefined_receiver) |
+ bool undefined_receiver, |
+ Zone* zone) |
: closure_(closure), |
arguments_count_(arguments_count), |
arguments_pushed_(false), |
@@ -1928,9 +1986,13 @@ class HEnterInlined: public HTemplateInstruction<0> { |
inlining_kind_(inlining_kind), |
arguments_var_(arguments_var), |
arguments_values_(arguments_values), |
- undefined_receiver_(undefined_receiver) { |
+ undefined_receiver_(undefined_receiver), |
+ return_targets_(2, zone) { |
} |
+ void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); |
+ ZoneList<HBasicBlock*>* return_targets() { return &return_targets_; } |
+ |
virtual void PrintDataTo(StringStream* stream); |
Handle<JSFunction> closure() const { return closure_; } |
@@ -1959,6 +2021,7 @@ class HEnterInlined: public HTemplateInstruction<0> { |
Variable* arguments_var_; |
ZoneList<HValue*>* arguments_values_; |
bool undefined_receiver_; |
+ ZoneList<HBasicBlock*> return_targets_; |
}; |