| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index d06e3184f817f2849d6e53395e3bff72aa061621..12b786ee7118cfed487f918677fdf901c4b48942 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,72 @@ 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);
|
| +
|
| +#ifdef DEBUG
|
| + void set_closure(Handle<JSFunction> closure) {
|
| + ASSERT(closure_.is_null());
|
| + ASSERT(!closure.is_null());
|
| + closure_ = closure;
|
| + }
|
| + Handle<JSFunction> closure() const { return closure_; }
|
| +#endif
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(EnvironmentBind);
|
| +
|
| + private:
|
| + int index_;
|
| +
|
| +#ifdef DEBUG
|
| + Handle<JSFunction> closure_;
|
| +#endif
|
| +};
|
| +
|
| +
|
| +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);
|
| +
|
| +#ifdef DEBUG
|
| + void set_closure(Handle<JSFunction> closure) {
|
| + ASSERT(closure_.is_null());
|
| + ASSERT(!closure.is_null());
|
| + closure_ = closure;
|
| + }
|
| + Handle<JSFunction> closure() const { return closure_; }
|
| +#endif
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(EnvironmentLookup);
|
| +
|
| + private:
|
| + int index_;
|
| +
|
| +#ifdef DEBUG
|
| + Handle<JSFunction> closure_;
|
| +#endif
|
| +};
|
| +
|
| +
|
| class HNumericConstraint : public HTemplateInstruction<2> {
|
| public:
|
| static HNumericConstraint* AddToGraph(HValue* constrained_value,
|
| @@ -1477,8 +1545,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 +1574,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 +1591,8 @@ class HDeoptimize: public HControlInstruction {
|
|
|
| private:
|
| ZoneList<HValue*> values_;
|
| + int first_local_index_;
|
| + int first_expression_index_;
|
| };
|
|
|
|
|
| @@ -1827,6 +1904,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]; }
|
|
|
| @@ -1841,6 +1924,8 @@ class HSimulate: public HInstruction {
|
|
|
| #ifdef DEBUG
|
| virtual void Verify();
|
| + void set_closure(Handle<JSFunction> closure) { closure_ = closure; }
|
| + Handle<JSFunction> closure() const { return closure_; }
|
| #endif
|
|
|
| protected:
|
| @@ -1864,6 +1949,10 @@ class HSimulate: public HInstruction {
|
| ZoneList<int> assigned_indexes_;
|
| Zone* zone_;
|
| RemovableSimulate removable_;
|
| +
|
| +#ifdef DEBUG
|
| + Handle<JSFunction> closure_;
|
| +#endif
|
| };
|
|
|
|
|
| @@ -1920,7 +2009,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 +2018,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 +2053,7 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| Variable* arguments_var_;
|
| ZoneList<HValue*>* arguments_values_;
|
| bool undefined_receiver_;
|
| + ZoneList<HBasicBlock*> return_targets_;
|
| };
|
|
|
|
|
|
|