Index: src/hydrogen-instructions.h |
=================================================================== |
--- src/hydrogen-instructions.h (revision 9687) |
+++ src/hydrogen-instructions.h (working copy) |
@@ -1347,7 +1347,7 @@ |
class HThisFunction: public HTemplateInstruction<0> { |
public: |
- HThisFunction() { |
+ explicit HThisFunction(Handle<JSFunction> closure) : closure_(closure) { |
set_representation(Representation::Tagged()); |
SetFlag(kUseGVN); |
} |
@@ -1356,10 +1356,18 @@ |
return Representation::None(); |
} |
+ Handle<JSFunction> closure() const { return closure_; } |
+ |
DECLARE_CONCRETE_INSTRUCTION(ThisFunction) |
protected: |
- virtual bool DataEquals(HValue* other) { return true; } |
+ virtual bool DataEquals(HValue* other) { |
+ HThisFunction* b = HThisFunction::cast(other); |
+ return *closure() == *b->closure(); |
+ } |
+ |
+ private: |
+ Handle<JSFunction> closure_; |
}; |