Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 345c6b9a328820b27e27c1b6c4e03696d372a4f8..9d650fb4c949327e73559088bf768184a4278b72 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -3691,6 +3691,8 @@ class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> { |
public: |
DECLARE_INSTRUCTION_FACTORY_P2(HWrapReceiver, HValue*, HValue*); |
+ virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } |
+ |
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
return Representation::Tagged(); |
} |
@@ -3701,15 +3703,21 @@ class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> { |
virtual HValue* Canonicalize() V8_OVERRIDE; |
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
+ bool known_function() const { return known_function_; } |
DECLARE_CONCRETE_INSTRUCTION(WrapReceiver) |
private: |
HWrapReceiver(HValue* receiver, HValue* function) { |
+ known_function_ = function->IsConstant() && |
+ HConstant::cast(function)->handle(function->isolate())->IsJSFunction(); |
set_representation(Representation::Tagged()); |
SetOperandAt(0, receiver); |
SetOperandAt(1, function); |
+ SetFlag(kUseGVN); |
} |
+ |
+ bool known_function_; |
}; |