| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 1bc28ba82dd9325ed67e6f5309ff96240941899b..e01260fa3f482155cf9a01dc69ad71e934ea6999 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -114,6 +114,7 @@ class LChunkBuilder;
|
| V(HasCachedArrayIndexAndBranch) \
|
| V(HasInstanceTypeAndBranch) \
|
| V(In) \
|
| + V(InlinedContext) \
|
| V(InstanceOf) \
|
| V(InstanceOfKnownGlobal) \
|
| V(InvokeFunction) \
|
| @@ -1294,17 +1295,19 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| public:
|
| HEnterInlined(Handle<JSFunction> closure,
|
| FunctionLiteral* function,
|
| - CallKind call_kind)
|
| + CallKind call_kind,
|
| + bool context_changed)
|
| : closure_(closure),
|
| function_(function),
|
| - call_kind_(call_kind) {
|
| - }
|
| + call_kind_(call_kind),
|
| + context_changed_(context_changed) {}
|
|
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| Handle<JSFunction> closure() const { return closure_; }
|
| FunctionLiteral* function() const { return function_; }
|
| CallKind call_kind() const { return call_kind_; }
|
| + bool context_changed() const { return context_changed_; }
|
|
|
| virtual Representation RequiredInputRepresentation(int index) const {
|
| return Representation::None();
|
| @@ -1316,6 +1319,7 @@ class HEnterInlined: public HTemplateInstruction<0> {
|
| Handle<JSFunction> closure_;
|
| FunctionLiteral* function_;
|
| CallKind call_kind_;
|
| + bool context_changed_;
|
| };
|
|
|
|
|
| @@ -1383,6 +1387,30 @@ class HContext: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| +class HInlinedContext: public HTemplateInstruction<0> {
|
| + public:
|
| + explicit HInlinedContext(Handle<JSFunction> closure)
|
| + : closure_(closure) {
|
| + set_representation(Representation::Tagged());
|
| + SetFlag(kUseGVN);
|
| + }
|
| +
|
| + Handle<JSFunction> closure() const { return closure_; }
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::None();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(InlinedContext);
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) { return false; } // Or check context.
|
| +
|
| + private:
|
| + Handle<JSFunction> closure_;
|
| +};
|
| +
|
| +
|
| class HOuterContext: public HUnaryOperation {
|
| public:
|
| explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) {
|
|
|