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

Unified Diff: src/hydrogen-instructions.h

Issue 6009005: Support load function prototype in hydrogen/lithium. (Closed)
Patch Set: Created 10 years 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
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index cbbe8fcc88a54f8505d2f1079d03c004bd5a8e89..537e5c493a426ec680c4a521e4994f023d0e825f 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -76,7 +76,6 @@ class LChunkBuilder;
// HLoadKeyed
// HLoadKeyedFastElement
// HLoadKeyedGeneric
-// HLoadNamedGeneric
// HPower
// HStoreNamed
// HStoreNamedField
@@ -132,6 +131,8 @@ class LChunkBuilder;
// HLoadElements
// HTypeofIs
// HLoadNamedField
+// HLoadNamedGeneric
+// HLoadFunctionPrototype
Kevin Millikin (Chromium) 2011/01/26 11:54:00 These are intended to be alphabetized.
Vitaly Repeshko 2011/01/26 14:06:23 Actually do we need this comment at all? It's a PI
// HPushArgument
// HTypeof
// HUnaryMathOperation
@@ -221,6 +222,7 @@ class LChunkBuilder;
V(LoadKeyedGeneric) \
V(LoadNamedField) \
V(LoadNamedGeneric) \
+ V(LoadFunctionPrototype) \
Kevin Millikin (Chromium) 2011/01/26 11:54:00 So are these.
V(Mod) \
V(Mul) \
V(ObjectLiteral) \
@@ -256,6 +258,7 @@ class LChunkBuilder;
V(GlobalVars) \
V(Maps) \
V(ArrayLengths) \
+ V(FunctionPrototypes) \
V(OsrEntries)
#define DECLARE_INSTRUCTION(type) \
@@ -2617,6 +2620,27 @@ class HLoadNamedGeneric: public HUnaryOperation {
};
+class HLoadFunctionPrototype: public HUnaryOperation {
+ public:
+ explicit HLoadFunctionPrototype(HValue* function)
+ : HUnaryOperation(function) {
+ set_representation(Representation::Tagged());
+ SetFlagMask(kDependsOnFunctionPrototypes);
Kevin Millikin (Chromium) 2011/01/26 11:54:00 1. Don't introduce a new kDependsOn... flag if the
Vitaly Repeshko 2011/01/26 14:06:23 There's DependsOnMaps and no ChangesMaps. We actua
+ }
+
+ HValue* function() const { return OperandAt(0); }
+
+ virtual Representation RequiredInputRepresentation(int index) const {
+ return Representation::Tagged();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype")
+
+ protected:
+ virtual bool DataEquals(HValue* other) const { return true; }
fschneider 2010/12/21 17:57:52 I think you can just rely on the implementation th
Vitaly Repeshko 2010/12/22 15:43:41 I just wanted to make it explicit that it's requir
Kevin Millikin (Chromium) 2011/01/26 11:54:00 1. It's not required unless the instruction has kU
Vitaly Repeshko 2011/01/26 14:06:23 Yeah, see above.
+};
+
+
class HLoadKeyed: public HBinaryOperation {
public:
HLoadKeyed(HValue* obj, HValue* key) : HBinaryOperation(obj, key) {

Powered by Google App Engine
This is Rietveld 408576698