Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: src/hydrogen-instructions.h

Issue 8346032: Allow inlining of named function expressions containing ThisFunction reference. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698