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

Unified Diff: src/hydrogen-instructions.h

Issue 6880014: Reduce the number of virtual functions in hydrogen-instruction.h classes (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 | « no previous file | src/hydrogen-instructions.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 7649)
+++ src/hydrogen-instructions.h (working copy)
@@ -48,18 +48,10 @@
class LChunkBuilder;
-#define HYDROGEN_ALL_INSTRUCTION_LIST(V) \
- V(ArithmeticBinaryOperation) \
- V(BinaryCall) \
- V(BinaryOperation) \
+#define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \
V(BitwiseBinaryOperation) \
V(ControlInstruction) \
V(Instruction) \
- V(Phi) \
- V(UnaryCall) \
- V(UnaryControlInstruction) \
- V(UnaryOperation) \
- HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \
@@ -182,19 +174,21 @@
V(ContextSlots) \
V(OsrEntries)
-#define DECLARE_INSTRUCTION(type) \
+#define DECLARE_ABSTRACT_INSTRUCTION(type) \
virtual bool Is##type() const { return true; } \
static H##type* cast(HValue* value) { \
ASSERT(value->Is##type()); \
return reinterpret_cast<H##type*>(value); \
- } \
- Opcode opcode() const { return HValue::k##type; }
+ }
-#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
+#define DECLARE_CONCRETE_INSTRUCTION(type) \
virtual LInstruction* CompileToLithium(LChunkBuilder* builder); \
- virtual const char* Mnemonic() const { return mnemonic; } \
- DECLARE_INSTRUCTION(type)
+ static H##type* cast(HValue* value) { \
+ ASSERT(value->Is##type()); \
+ return reinterpret_cast<H##type*>(value); \
+ } \
+ virtual Opcode opcode() const { return HValue::k##type; }
class Range: public ZoneObject {
@@ -456,12 +450,26 @@
enum Opcode {
// Declare a unique enum value for each hydrogen instruction.
- #define DECLARE_DO(type) k##type,
- HYDROGEN_ALL_INSTRUCTION_LIST(DECLARE_DO)
- #undef DECLARE_DO
- kMaxInstructionClass
+ #define DECLARE_OPCODE(type) k##type,
+ HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE)
+ kPhi
+ #undef DECLARE_OPCODE
};
+ virtual Opcode opcode() const = 0;
+ // Declare a non-virtual predicates for each concrete HInstruction or HValue.
+ #define DECLARE_PREDICATE(type) \
+ bool Is##type() const { return opcode() == k##type; }
+ HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE)
+ #undef DECLARE_PREDICATE
+ bool IsPhi() const { return opcode() == kPhi; }
+
+ // Declare virtual predicates for abstract HInstruction or HValue
+ #define DECLARE_PREDICATE(type) \
+ virtual bool Is##type() const { return false; }
+ HYDROGEN_ABSTRACT_INSTRUCTION_LIST(DECLARE_PREDICATE)
+ #undef DECLARE_PREDICATE
+
HValue() : block_(NULL),
id_(kNoNumber),
type_(HType::Tagged()),
@@ -555,11 +563,6 @@
// then return it. Return NULL to have the instruction deleted.
virtual HValue* Canonicalize() { return this; }
- // Declare virtual type testers.
-#define DECLARE_DO(type) virtual bool Is##type() const { return false; }
- HYDROGEN_ALL_INSTRUCTION_LIST(DECLARE_DO)
-#undef DECLARE_DO
-
bool Equals(HValue* other);
virtual intptr_t Hashcode();
@@ -568,8 +571,7 @@
void PrintNameTo(StringStream* stream);
static void PrintTypeTo(HType type, StringStream* stream);
- virtual const char* Mnemonic() const = 0;
- virtual Opcode opcode() const = 0;
+ const char* Mnemonic() const;
// Updated the inferred type of this instruction and returns true if
// it has changed.
@@ -657,7 +659,7 @@
virtual bool IsCall() { return false; }
- DECLARE_INSTRUCTION(Instruction)
+ DECLARE_ABSTRACT_INSTRUCTION(Instruction)
protected:
HInstruction()
@@ -694,7 +696,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_INSTRUCTION(ControlInstruction)
+ DECLARE_ABSTRACT_INSTRUCTION(ControlInstruction)
private:
HBasicBlock* first_successor_;
@@ -766,7 +768,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(BlockEntry, "block_entry")
+ DECLARE_CONCRETE_INSTRUCTION(BlockEntry)
};
@@ -788,7 +790,7 @@
SetOperandAt(values_.length() - 1, value);
}
- DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
+ DECLARE_CONCRETE_INSTRUCTION(Deoptimize)
protected:
virtual void InternalSetOperandAt(int index, HValue* value) {
@@ -815,7 +817,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
+ DECLARE_CONCRETE_INSTRUCTION(Goto)
private:
bool include_stack_check_;
@@ -834,8 +836,6 @@
virtual void PrintDataTo(StringStream* stream);
HValue* value() { return OperandAt(0); }
-
- DECLARE_INSTRUCTION(UnaryControlInstruction)
};
@@ -850,7 +850,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(Test, "test")
+ DECLARE_CONCRETE_INSTRUCTION(Test)
};
@@ -875,7 +875,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(CompareMap, "compare_map")
+ DECLARE_CONCRETE_INSTRUCTION(CompareMap)
private:
Handle<Map> map_;
@@ -892,7 +892,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(Return, "return")
+ DECLARE_CONCRETE_INSTRUCTION(Return)
};
@@ -904,7 +904,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(AbnormalExit, "abnormal_exit")
+ DECLARE_CONCRETE_INSTRUCTION(AbnormalExit)
};
@@ -916,8 +916,6 @@
HValue* value() { return OperandAt(0); }
virtual void PrintDataTo(StringStream* stream);
-
- DECLARE_INSTRUCTION(UnaryOperation)
};
@@ -931,7 +929,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
+ DECLARE_CONCRETE_INSTRUCTION(Throw)
};
@@ -965,8 +963,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(Change,
- CanTruncateToInt32() ? "truncate" : "change")
+ DECLARE_CONCRETE_INSTRUCTION(Change)
protected:
virtual bool DataEquals(HValue* other) {
@@ -1021,7 +1018,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(Simulate, "simulate")
+ DECLARE_CONCRETE_INSTRUCTION(Simulate)
#ifdef DEBUG
virtual void Verify();
@@ -1057,7 +1054,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack_check")
+ DECLARE_CONCRETE_INSTRUCTION(StackCheck)
};
@@ -1076,7 +1073,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(EnterInlined, "enter_inlined")
+ DECLARE_CONCRETE_INSTRUCTION(EnterInlined)
private:
Handle<JSFunction> closure_;
@@ -1092,7 +1089,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(LeaveInlined, "leave_inlined")
+ DECLARE_CONCRETE_INSTRUCTION(LeaveInlined)
};
@@ -1108,7 +1105,7 @@
HValue* argument() { return OperandAt(0); }
- DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push_argument")
+ DECLARE_CONCRETE_INSTRUCTION(PushArgument)
};
@@ -1123,7 +1120,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(Context, "context");
+ DECLARE_CONCRETE_INSTRUCTION(Context);
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1137,7 +1134,7 @@
SetFlag(kUseGVN);
}
- DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer_context");
+ DECLARE_CONCRETE_INSTRUCTION(OuterContext);
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -1155,7 +1152,7 @@
SetFlag(kUseGVN);
}
- DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global_object")
+ DECLARE_CONCRETE_INSTRUCTION(GlobalObject)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -1174,7 +1171,7 @@
SetFlag(kUseGVN);
}
- DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global_receiver")
+ DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -1219,8 +1216,6 @@
virtual void PrintDataTo(StringStream* stream);
HValue* value() { return OperandAt(0); }
-
- DECLARE_INSTRUCTION(UnaryCall)
};
@@ -1240,8 +1235,6 @@
HValue* first() { return OperandAt(0); }
HValue* second() { return OperandAt(1); }
-
- DECLARE_INSTRUCTION(BinaryCall)
};
@@ -1258,7 +1251,7 @@
HValue* context() { return first(); }
HValue* function() { return second(); }
- DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke_function")
+ DECLARE_CONCRETE_INSTRUCTION(InvokeFunction)
};
@@ -1280,7 +1273,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call_constant_function")
+ DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction)
private:
Handle<JSFunction> function_;
@@ -1300,7 +1293,7 @@
HValue* context() { return first(); }
HValue* key() { return second(); }
- DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call_keyed")
+ DECLARE_CONCRETE_INSTRUCTION(CallKeyed)
};
@@ -1315,7 +1308,7 @@
HValue* context() { return value(); }
Handle<String> name() const { return name_; }
- DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call_named")
+ DECLARE_CONCRETE_INSTRUCTION(CallNamed)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -1338,7 +1331,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call_function")
+ DECLARE_CONCRETE_INSTRUCTION(CallFunction)
};
@@ -1357,7 +1350,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call_global")
+ DECLARE_CONCRETE_INSTRUCTION(CallGlobal)
private:
Handle<String> name_;
@@ -1377,7 +1370,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call_known_global")
+ DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal)
private:
Handle<JSFunction> target_;
@@ -1397,7 +1390,7 @@
HValue* context() { return first(); }
HValue* constructor() { return second(); }
- DECLARE_CONCRETE_INSTRUCTION(CallNew, "call_new")
+ DECLARE_CONCRETE_INSTRUCTION(CallNew)
};
@@ -1416,7 +1409,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call_runtime")
+ DECLARE_CONCRETE_INSTRUCTION(CallRuntime)
private:
const Runtime::Function* c_function_;
@@ -1440,7 +1433,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js_array_length")
+ DECLARE_CONCRETE_INSTRUCTION(JSArrayLength)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1459,7 +1452,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length")
+ DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1480,7 +1473,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength, "external_array_length")
+ DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1500,7 +1493,7 @@
}
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not")
+ DECLARE_CONCRETE_INSTRUCTION(BitNot)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1572,7 +1565,7 @@
BuiltinFunctionId op() const { return op_; }
const char* OpName() const;
- DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary_math_operation")
+ DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation)
protected:
virtual bool DataEquals(HValue* other) {
@@ -1597,7 +1590,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
+ DECLARE_CONCRETE_INSTRUCTION(LoadElements)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1620,8 +1613,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
- "load-external-array-pointer")
+ DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1651,7 +1643,7 @@
Handle<Map> map() const { return map_; }
- DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check_map")
+ DECLARE_CONCRETE_INSTRUCTION(CheckMap)
protected:
virtual bool DataEquals(HValue* other) {
@@ -1686,7 +1678,7 @@
Handle<JSFunction> target() const { return target_; }
- DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check_function")
+ DECLARE_CONCRETE_INSTRUCTION(CheckFunction)
protected:
virtual bool DataEquals(HValue* other) {
@@ -1741,7 +1733,7 @@
InstanceType first() const { return first_; }
InstanceType last() const { return last_; }
- DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check_instance_type")
+ DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType)
protected:
// TODO(ager): It could be nice to allow the ommision of instance
@@ -1789,7 +1781,7 @@
return this;
}
- DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check_non_smi")
+ DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1813,7 +1805,7 @@
Handle<JSObject> prototype() const { return prototype_; }
Handle<JSObject> holder() const { return holder_; }
- DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check_prototype_maps")
+ DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
@@ -1857,7 +1849,7 @@
virtual void Verify();
#endif
- DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check_smi")
+ DECLARE_CONCRETE_INSTRUCTION(CheckSmi)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -1910,16 +1902,12 @@
int merged_index() const { return merged_index_; }
- virtual const char* Mnemonic() const { return "phi"; }
-
virtual void PrintTo(StringStream* stream);
#ifdef DEBUG
virtual void Verify();
#endif
- DECLARE_INSTRUCTION(Phi)
-
void InitRealUses(int id);
void AddNonPhiUsesFrom(HPhi* other);
void AddIndirectUsesTo(int* use_count);
@@ -1946,6 +1934,12 @@
bool is_live() { return is_live_; }
void set_is_live(bool b) { is_live_ = b; }
+ static HPhi* cast(HValue* value) {
+ ASSERT(value->IsPhi());
+ return reinterpret_cast<HPhi*>(value);
+ }
+ virtual Opcode opcode() const { return HValue::kPhi; }
+
protected:
virtual void DeleteFromGraph();
virtual void InternalSetOperandAt(int index, HValue* value) {
@@ -1974,7 +1968,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(ArgumentsObject, "arguments-object")
+ DECLARE_CONCRETE_INSTRUCTION(ArgumentsObject)
};
@@ -2019,7 +2013,7 @@
virtual void Verify() { }
#endif
- DECLARE_CONCRETE_INSTRUCTION(Constant, "constant")
+ DECLARE_CONCRETE_INSTRUCTION(Constant)
protected:
virtual Range* InferRange();
@@ -2067,8 +2061,6 @@
virtual bool IsCommutative() const { return false; }
virtual void PrintDataTo(StringStream* stream);
-
- DECLARE_INSTRUCTION(BinaryOperation)
};
@@ -2098,7 +2090,7 @@
HValue* length() { return OperandAt(2); }
HValue* elements() { return OperandAt(3); }
- DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply_arguments")
+ DECLARE_CONCRETE_INSTRUCTION(ApplyArguments)
};
@@ -2111,7 +2103,7 @@
SetFlag(kUseGVN);
}
- DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments_elements")
+ DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
@@ -2133,7 +2125,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments_length")
+ DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2163,7 +2155,7 @@
HValue* length() { return OperandAt(1); }
HValue* index() { return OperandAt(2); }
- DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access_arguments_at")
+ DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt)
virtual bool DataEquals(HValue* other) { return true; }
};
@@ -2189,7 +2181,7 @@
HValue* index() { return left(); }
HValue* length() { return right(); }
- DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds_check")
+ DECLARE_CONCRETE_INSTRUCTION(BoundsCheck)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2220,7 +2212,7 @@
virtual HType CalculateInferredType();
- DECLARE_INSTRUCTION(BitwiseBinaryOperation)
+ DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation)
};
@@ -2250,8 +2242,6 @@
}
return HValue::InferredRepresentation();
}
-
- DECLARE_INSTRUCTION(ArithmeticBinaryOperation)
};
@@ -2285,7 +2275,7 @@
return HValue::Hashcode() * 7 + token_;
}
- DECLARE_CONCRETE_INSTRUCTION(Compare, "compare")
+ DECLARE_CONCRETE_INSTRUCTION(Compare)
protected:
virtual bool DataEquals(HValue* other) {
@@ -2317,7 +2307,7 @@
}
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq, "compare-js-object-eq")
+ DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2349,7 +2339,7 @@
bool is_strict() const { return is_strict_; }
- DECLARE_CONCRETE_INSTRUCTION(IsNull, "is_null")
+ DECLARE_CONCRETE_INSTRUCTION(IsNull)
protected:
virtual bool DataEquals(HValue* other) {
@@ -2366,7 +2356,7 @@
public:
explicit HIsObject(HValue* value) : HUnaryPredicate(value) { }
- DECLARE_CONCRETE_INSTRUCTION(IsObject, "is_object")
+ DECLARE_CONCRETE_INSTRUCTION(IsObject)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2377,7 +2367,7 @@
public:
explicit HIsSmi(HValue* value) : HUnaryPredicate(value) { }
- DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is_smi")
+ DECLARE_CONCRETE_INSTRUCTION(IsSmi)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2399,7 +2389,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is_construct_call")
+ DECLARE_CONCRETE_INSTRUCTION(IsConstructCall)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2420,7 +2410,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has_instance_type")
+ DECLARE_CONCRETE_INSTRUCTION(HasInstanceType)
protected:
virtual bool DataEquals(HValue* other) {
@@ -2438,7 +2428,7 @@
public:
explicit HHasCachedArrayIndex(HValue* value) : HUnaryPredicate(value) { }
- DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has_cached_array_index")
+ DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2449,7 +2439,7 @@
public:
explicit HGetCachedArrayIndex(HValue* value) : HUnaryPredicate(value) { }
- DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get_cached_array_index")
+ DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2461,7 +2451,7 @@
HClassOfTest(HValue* value, Handle<String> class_name)
: HUnaryPredicate(value), class_name_(class_name) { }
- DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class_of_test")
+ DECLARE_CONCRETE_INSTRUCTION(ClassOfTest)
virtual void PrintDataTo(StringStream* stream);
@@ -2486,7 +2476,7 @@
Handle<String> type_literal() { return type_literal_; }
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof_is")
+ DECLARE_CONCRETE_INSTRUCTION(TypeofIs)
protected:
virtual bool DataEquals(HValue* other) {
@@ -2523,7 +2513,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of")
+ DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
};
@@ -2541,8 +2531,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
- "instance_of_known_global")
+ DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal)
private:
Handle<JSFunction> function_;
@@ -2561,7 +2550,7 @@
return (index == 1) ? Representation::None() : Representation::Double();
}
- DECLARE_CONCRETE_INSTRUCTION(Power, "power")
+ DECLARE_CONCRETE_INSTRUCTION(Power)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2584,7 +2573,7 @@
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(Add, "add")
+ DECLARE_CONCRETE_INSTRUCTION(Add)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2601,7 +2590,7 @@
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
- DECLARE_CONCRETE_INSTRUCTION(Sub, "sub")
+ DECLARE_CONCRETE_INSTRUCTION(Sub)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2623,7 +2612,7 @@
return !representation().IsTagged();
}
- DECLARE_CONCRETE_INSTRUCTION(Mul, "mul")
+ DECLARE_CONCRETE_INSTRUCTION(Mul)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2650,7 +2639,7 @@
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
- DECLARE_CONCRETE_INSTRUCTION(Mod, "mod")
+ DECLARE_CONCRETE_INSTRUCTION(Mod)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2668,7 +2657,7 @@
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
- DECLARE_CONCRETE_INSTRUCTION(Div, "div")
+ DECLARE_CONCRETE_INSTRUCTION(Div)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2685,7 +2674,7 @@
virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(BitAnd, "bit_and")
+ DECLARE_CONCRETE_INSTRUCTION(BitAnd)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2702,7 +2691,7 @@
virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(BitXor, "bit_xor")
+ DECLARE_CONCRETE_INSTRUCTION(BitXor)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2717,7 +2706,7 @@
virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(BitOr, "bit_or")
+ DECLARE_CONCRETE_INSTRUCTION(BitOr)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2734,7 +2723,7 @@
virtual Range* InferRange();
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(Shl, "shl")
+ DECLARE_CONCRETE_INSTRUCTION(Shl)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2748,7 +2737,7 @@
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(Shr, "shr")
+ DECLARE_CONCRETE_INSTRUCTION(Shr)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2763,7 +2752,7 @@
virtual Range* InferRange();
virtual HType CalculateInferredType();
- DECLARE_CONCRETE_INSTRUCTION(Sar, "sar")
+ DECLARE_CONCRETE_INSTRUCTION(Sar)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -2782,7 +2771,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr_entry")
+ DECLARE_CONCRETE_INSTRUCTION(OsrEntry)
private:
int ast_id_;
@@ -2803,7 +2792,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
+ DECLARE_CONCRETE_INSTRUCTION(Parameter)
private:
unsigned index_;
@@ -2835,7 +2824,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(CallStub, "call_stub")
+ DECLARE_CONCRETE_INSTRUCTION(CallStub)
private:
CodeStub::Major major_key_;
@@ -2851,7 +2840,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown_osr_value")
+ DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue)
};
@@ -2878,7 +2867,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load_global_cell")
+ DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell)
protected:
virtual bool DataEquals(HValue* other) {
@@ -2916,7 +2905,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic")
+ DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric)
private:
Handle<Object> name_;
@@ -2943,7 +2932,7 @@
}
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store_global_cell")
+ DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell)
private:
Handle<JSGlobalPropertyCell> cell_;
@@ -2979,7 +2968,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic")
+ DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric)
private:
Handle<Object> name_;
@@ -3004,7 +2993,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load_context_slot")
+ DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot)
protected:
virtual bool DataEquals(HValue* other) {
@@ -3044,7 +3033,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store_context_slot")
+ DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot)
private:
int slot_index_;
@@ -3076,7 +3065,7 @@
}
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load_named_field")
+ DECLARE_CONCRETE_INSTRUCTION(LoadNamedField)
protected:
virtual bool DataEquals(HValue* other) {
@@ -3105,8 +3094,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic,
- "load_named_field_polymorphic")
+ DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic)
static const int kMaxLoadPolymorphism = 4;
@@ -3137,7 +3125,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load_named_generic")
+ DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
private:
Handle<Object> name_;
@@ -3159,7 +3147,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype")
+ DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -3185,8 +3173,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement,
- "load_keyed_fast_element")
+ DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -3224,8 +3211,7 @@
HValue* key() { return OperandAt(1); }
ExternalArrayType array_type() const { return array_type_; }
- DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
- "load_keyed_specialized_array_element")
+ DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement)
protected:
virtual bool DataEquals(HValue* other) {
@@ -3260,7 +3246,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load_keyed_generic")
+ DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric)
};
@@ -3282,7 +3268,7 @@
}
}
- DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store_named_field")
+ DECLARE_CONCRETE_INSTRUCTION(StoreNamedField)
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -3337,7 +3323,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store_named_generic")
+ DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric)
private:
Handle<String> name_;
@@ -3370,8 +3356,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
- "store_keyed_fast_element")
+ DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement)
};
@@ -3407,8 +3392,8 @@
HValue* value() { return OperandAt(2); }
ExternalArrayType array_type() const { return array_type_; }
- DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
- "store_keyed_specialized_array_element")
+ DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement)
+
private:
ExternalArrayType array_type_;
};
@@ -3441,7 +3426,7 @@
virtual void PrintDataTo(StringStream* stream);
- DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store_keyed_generic")
+ DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric)
private:
bool strict_mode_;
@@ -3464,7 +3449,7 @@
return HType::String();
}
- DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string_add")
+ DECLARE_CONCRETE_INSTRUCTION(StringAdd)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -3489,7 +3474,7 @@
HValue* string() { return OperandAt(0); }
HValue* index() { return OperandAt(1); }
- DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string_char_code_at")
+ DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -3513,7 +3498,7 @@
virtual bool DataEquals(HValue* other) { return true; }
- DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string_char_from_code")
+ DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode)
};
@@ -3534,7 +3519,7 @@
return HType::Smi();
}
- DECLARE_CONCRETE_INSTRUCTION(StringLength, "string_length")
+ DECLARE_CONCRETE_INSTRUCTION(StringLength)
protected:
virtual bool DataEquals(HValue* other) { return true; }
@@ -3581,7 +3566,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array_literal")
+ DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral)
private:
int length_;
@@ -3615,7 +3600,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal")
+ DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral)
private:
Handle<FixedArray> constant_properties_;
@@ -3640,7 +3625,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp_literal")
+ DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral)
private:
Handle<String> pattern_;
@@ -3659,7 +3644,7 @@
return Representation::None();
}
- DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function_literal")
+ DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral)
Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
bool pretenure() const { return pretenure_; }
@@ -3680,7 +3665,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
+ DECLARE_CONCRETE_INSTRUCTION(Typeof)
};
@@ -3698,7 +3683,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to_fast_properties")
+ DECLARE_CONCRETE_INSTRUCTION(ToFastProperties)
};
@@ -3712,7 +3697,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value_of")
+ DECLARE_CONCRETE_INSTRUCTION(ValueOf)
};
@@ -3728,7 +3713,7 @@
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete_property")
+ DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
HValue* object() { return left(); }
HValue* key() { return right(); }
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698