Chromium Code Reviews| 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) \ |
| @@ -139,6 +131,7 @@ |
| V(OsrEntry) \ |
| V(OuterContext) \ |
| V(Parameter) \ |
| + V(Phi) \ |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
It seems like a type error to have Phi (a Value bu
fschneider
2011/04/19 09:08:54
Done.
|
| V(Power) \ |
| V(PushArgument) \ |
| V(RegExpLiteral) \ |
| @@ -182,19 +175,21 @@ |
| V(ContextSlots) \ |
| V(OsrEntries) |
| -#define DECLARE_INSTRUCTION(type) \ |
| +#define DECLARE_ABSTRACT_INSTRUCTION(type) \ |
| virtual bool Is##type() const { return true; } \ |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
I'd prefer if we could come up with a way to have
fschneider
2011/04/19 09:08:54
Done.
|
| 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); \ |
| + } \ |
| + Opcode opcode() const { return HValue::k##type; } |
| class Range: public ZoneObject { |
| @@ -457,11 +452,22 @@ |
| enum Opcode { |
| // Declare a unique enum value for each hydrogen instruction. |
| #define DECLARE_DO(type) k##type, |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
This is not part of your change, but I really disl
fschneider
2011/04/19 09:08:54
Done.
|
| - HYDROGEN_ALL_INSTRUCTION_LIST(DECLARE_DO) |
| + HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| #undef DECLARE_DO |
| kMaxInstructionClass |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
This seems like another silly name. I don't know
fschneider
2011/04/19 09:08:54
Done.
|
| }; |
| + virtual Opcode opcode() const = 0; |
| + // Declare a non-virtual type-tester for each concrete instruction. |
| + #define DECLARE_DO(type) bool Is##type() const { return opcode() == k##type; } |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
Please DECLARE_PREDICATE or something.
Do we ever
fschneider
2011/04/19 09:08:54
Done.
|
| + HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| + #undef DECLARE_DO |
| + |
| + // Declare virtual type-testers for the abstract instructions. |
| + #define DECLARE_DO(type) virtual bool Is##type() const { return false; } |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
Same comment.
fschneider
2011/04/19 09:08:54
Done.
|
| + HYDROGEN_ABSTRACT_INSTRUCTION_LIST(DECLARE_DO) |
| + #undef DECLARE_DO |
| + |
| HValue() : block_(NULL), |
| id_(kNoNumber), |
| type_(HType::Tagged()), |
| @@ -555,11 +561,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 +569,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 +657,7 @@ |
| virtual bool IsCall() { return false; } |
| - DECLARE_INSTRUCTION(Instruction) |
| + DECLARE_ABSTRACT_INSTRUCTION(Instruction) |
| protected: |
| HInstruction() |
| @@ -694,7 +694,7 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_INSTRUCTION(ControlInstruction) |
| + DECLARE_ABSTRACT_INSTRUCTION(ControlInstruction) |
| private: |
| HBasicBlock* first_successor_; |
| @@ -766,7 +766,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(BlockEntry, "block_entry") |
| + DECLARE_CONCRETE_INSTRUCTION(BlockEntry) |
|
Kevin Millikin (Chromium)
2011/04/19 07:40:52
Thank you.
|
| }; |
| @@ -788,7 +788,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 +815,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") |
| + DECLARE_CONCRETE_INSTRUCTION(Goto) |
| private: |
| bool include_stack_check_; |
| @@ -834,8 +834,6 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| HValue* value() { return OperandAt(0); } |
| - |
| - DECLARE_INSTRUCTION(UnaryControlInstruction) |
| }; |
| @@ -850,7 +848,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Test, "test") |
| + DECLARE_CONCRETE_INSTRUCTION(Test) |
| }; |
| @@ -875,7 +873,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CompareMap, "compare_map") |
| + DECLARE_CONCRETE_INSTRUCTION(CompareMap) |
| private: |
| Handle<Map> map_; |
| @@ -892,7 +890,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
| + DECLARE_CONCRETE_INSTRUCTION(Return) |
| }; |
| @@ -904,7 +902,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(AbnormalExit, "abnormal_exit") |
| + DECLARE_CONCRETE_INSTRUCTION(AbnormalExit) |
| }; |
| @@ -916,8 +914,6 @@ |
| HValue* value() { return OperandAt(0); } |
| virtual void PrintDataTo(StringStream* stream); |
| - |
| - DECLARE_INSTRUCTION(UnaryOperation) |
| }; |
| @@ -931,7 +927,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
| + DECLARE_CONCRETE_INSTRUCTION(Throw) |
| }; |
| @@ -965,8 +961,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 +1016,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Simulate, "simulate") |
| + DECLARE_CONCRETE_INSTRUCTION(Simulate) |
| #ifdef DEBUG |
| virtual void Verify(); |
| @@ -1057,7 +1052,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack_check") |
| + DECLARE_CONCRETE_INSTRUCTION(StackCheck) |
| }; |
| @@ -1076,7 +1071,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(EnterInlined, "enter_inlined") |
| + DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
| private: |
| Handle<JSFunction> closure_; |
| @@ -1092,7 +1087,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LeaveInlined, "leave_inlined") |
| + DECLARE_CONCRETE_INSTRUCTION(LeaveInlined) |
| }; |
| @@ -1108,7 +1103,7 @@ |
| HValue* argument() { return OperandAt(0); } |
| - DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push_argument") |
| + DECLARE_CONCRETE_INSTRUCTION(PushArgument) |
| }; |
| @@ -1123,7 +1118,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Context, "context"); |
| + DECLARE_CONCRETE_INSTRUCTION(Context); |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -1137,7 +1132,7 @@ |
| SetFlag(kUseGVN); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer_context"); |
| + DECLARE_CONCRETE_INSTRUCTION(OuterContext); |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::Tagged(); |
| @@ -1155,7 +1150,7 @@ |
| SetFlag(kUseGVN); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global_object") |
| + DECLARE_CONCRETE_INSTRUCTION(GlobalObject) |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::Tagged(); |
| @@ -1174,7 +1169,7 @@ |
| SetFlag(kUseGVN); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global_receiver") |
| + DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver) |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::Tagged(); |
| @@ -1219,8 +1214,6 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| HValue* value() { return OperandAt(0); } |
| - |
| - DECLARE_INSTRUCTION(UnaryCall) |
| }; |
| @@ -1240,8 +1233,6 @@ |
| HValue* first() { return OperandAt(0); } |
| HValue* second() { return OperandAt(1); } |
| - |
| - DECLARE_INSTRUCTION(BinaryCall) |
| }; |
| @@ -1258,7 +1249,7 @@ |
| HValue* context() { return first(); } |
| HValue* function() { return second(); } |
| - DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke_function") |
| + DECLARE_CONCRETE_INSTRUCTION(InvokeFunction) |
| }; |
| @@ -1280,7 +1271,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call_constant_function") |
| + DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction) |
| private: |
| Handle<JSFunction> function_; |
| @@ -1300,7 +1291,7 @@ |
| HValue* context() { return first(); } |
| HValue* key() { return second(); } |
| - DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call_keyed") |
| + DECLARE_CONCRETE_INSTRUCTION(CallKeyed) |
| }; |
| @@ -1315,7 +1306,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 +1329,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call_function") |
| + DECLARE_CONCRETE_INSTRUCTION(CallFunction) |
| }; |
| @@ -1357,7 +1348,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call_global") |
| + DECLARE_CONCRETE_INSTRUCTION(CallGlobal) |
| private: |
| Handle<String> name_; |
| @@ -1377,7 +1368,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call_known_global") |
| + DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal) |
| private: |
| Handle<JSFunction> target_; |
| @@ -1397,7 +1388,7 @@ |
| HValue* context() { return first(); } |
| HValue* constructor() { return second(); } |
| - DECLARE_CONCRETE_INSTRUCTION(CallNew, "call_new") |
| + DECLARE_CONCRETE_INSTRUCTION(CallNew) |
| }; |
| @@ -1416,7 +1407,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call_runtime") |
| + DECLARE_CONCRETE_INSTRUCTION(CallRuntime) |
| private: |
| const Runtime::Function* c_function_; |
| @@ -1440,7 +1431,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 +1450,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 +1471,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 +1491,7 @@ |
| } |
| virtual HType CalculateInferredType(); |
| - DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not") |
| + DECLARE_CONCRETE_INSTRUCTION(BitNot) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -1572,7 +1563,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 +1588,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadElements) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -1620,8 +1611,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 +1641,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 +1676,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 +1731,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 +1779,7 @@ |
| return this; |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check_non_smi") |
| + DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -1813,7 +1803,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 +1847,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 +1900,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 +1932,8 @@ |
| bool is_live() { return is_live_; } |
| void set_is_live(bool b) { is_live_ = b; } |
| + DECLARE_CONCRETE_INSTRUCTION(Phi) |
| + |
| protected: |
| virtual void DeleteFromGraph(); |
| virtual void InternalSetOperandAt(int index, HValue* value) { |
| @@ -1974,7 +1962,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ArgumentsObject, "arguments-object") |
| + DECLARE_CONCRETE_INSTRUCTION(ArgumentsObject) |
| }; |
| @@ -2019,7 +2007,7 @@ |
| virtual void Verify() { } |
| #endif |
| - DECLARE_CONCRETE_INSTRUCTION(Constant, "constant") |
| + DECLARE_CONCRETE_INSTRUCTION(Constant) |
| protected: |
| virtual Range* InferRange(); |
| @@ -2067,8 +2055,6 @@ |
| virtual bool IsCommutative() const { return false; } |
| virtual void PrintDataTo(StringStream* stream); |
| - |
| - DECLARE_INSTRUCTION(BinaryOperation) |
| }; |
| @@ -2098,7 +2084,7 @@ |
| HValue* length() { return OperandAt(2); } |
| HValue* elements() { return OperandAt(3); } |
| - DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply_arguments") |
| + DECLARE_CONCRETE_INSTRUCTION(ApplyArguments) |
| }; |
| @@ -2111,7 +2097,7 @@ |
| SetFlag(kUseGVN); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments_elements") |
| + DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::None(); |
| @@ -2133,7 +2119,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments_length") |
| + DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -2163,7 +2149,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 +2175,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 +2206,7 @@ |
| virtual HType CalculateInferredType(); |
| - DECLARE_INSTRUCTION(BitwiseBinaryOperation) |
| + DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation) |
| }; |
| @@ -2250,8 +2236,6 @@ |
| } |
| return HValue::InferredRepresentation(); |
| } |
| - |
| - DECLARE_INSTRUCTION(ArithmeticBinaryOperation) |
| }; |
| @@ -2285,7 +2269,7 @@ |
| return HValue::Hashcode() * 7 + token_; |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Compare, "compare") |
| + DECLARE_CONCRETE_INSTRUCTION(Compare) |
| protected: |
| virtual bool DataEquals(HValue* other) { |
| @@ -2317,7 +2301,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 +2333,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 +2350,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 +2361,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 +2383,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 +2404,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 +2422,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 +2433,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 +2445,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 +2470,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 +2507,7 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance_of") |
| + DECLARE_CONCRETE_INSTRUCTION(InstanceOf) |
| }; |
| @@ -2541,8 +2525,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
| - "instance_of_known_global") |
| + DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal) |
| private: |
| Handle<JSFunction> function_; |
| @@ -2561,7 +2544,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 +2567,7 @@ |
| virtual HType CalculateInferredType(); |
| - DECLARE_CONCRETE_INSTRUCTION(Add, "add") |
| + DECLARE_CONCRETE_INSTRUCTION(Add) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -2601,7 +2584,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 +2606,7 @@ |
| return !representation().IsTagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Mul, "mul") |
| + DECLARE_CONCRETE_INSTRUCTION(Mul) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -2650,7 +2633,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 +2651,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 +2668,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 +2685,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 +2700,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 +2717,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 +2731,7 @@ |
| virtual HType CalculateInferredType(); |
| - DECLARE_CONCRETE_INSTRUCTION(Shr, "shr") |
| + DECLARE_CONCRETE_INSTRUCTION(Shr) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -2763,7 +2746,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 +2765,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr_entry") |
| + DECLARE_CONCRETE_INSTRUCTION(OsrEntry) |
| private: |
| int ast_id_; |
| @@ -2803,7 +2786,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
| + DECLARE_CONCRETE_INSTRUCTION(Parameter) |
| private: |
| unsigned index_; |
| @@ -2835,7 +2818,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(CallStub, "call_stub") |
| + DECLARE_CONCRETE_INSTRUCTION(CallStub) |
| private: |
| CodeStub::Major major_key_; |
| @@ -2851,7 +2834,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown_osr_value") |
| + DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue) |
| }; |
| @@ -2878,7 +2861,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load_global_cell") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) |
| protected: |
| virtual bool DataEquals(HValue* other) { |
| @@ -2916,7 +2899,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) |
| private: |
| Handle<Object> name_; |
| @@ -2943,7 +2926,7 @@ |
| } |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store_global_cell") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell) |
| private: |
| Handle<JSGlobalPropertyCell> cell_; |
| @@ -2979,7 +2962,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric) |
| private: |
| Handle<Object> name_; |
| @@ -3004,7 +2987,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 +3027,7 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store_context_slot") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot) |
| private: |
| int slot_index_; |
| @@ -3076,7 +3059,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 +3088,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic, |
| - "load_named_field_polymorphic") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadNamedFieldPolymorphic) |
| static const int kMaxLoadPolymorphism = 4; |
| @@ -3137,7 +3119,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load_named_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) |
| private: |
| Handle<Object> name_; |
| @@ -3159,7 +3141,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 +3167,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 +3205,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 +3240,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load_keyed_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) |
| }; |
| @@ -3282,7 +3262,7 @@ |
| } |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store_named_field") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::Tagged(); |
| @@ -3337,7 +3317,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store_named_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) |
| private: |
| Handle<String> name_; |
| @@ -3370,8 +3350,7 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, |
| - "store_keyed_fast_element") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement) |
| }; |
| @@ -3407,8 +3386,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 +3420,7 @@ |
| virtual void PrintDataTo(StringStream* stream); |
| - DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store_keyed_generic") |
| + DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) |
| private: |
| bool strict_mode_; |
| @@ -3464,7 +3443,7 @@ |
| return HType::String(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string_add") |
| + DECLARE_CONCRETE_INSTRUCTION(StringAdd) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -3489,7 +3468,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 +3492,7 @@ |
| virtual bool DataEquals(HValue* other) { return true; } |
| - DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string_char_from_code") |
| + DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode) |
| }; |
| @@ -3534,7 +3513,7 @@ |
| return HType::Smi(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(StringLength, "string_length") |
| + DECLARE_CONCRETE_INSTRUCTION(StringLength) |
| protected: |
| virtual bool DataEquals(HValue* other) { return true; } |
| @@ -3581,7 +3560,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array_literal") |
| + DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral) |
| private: |
| int length_; |
| @@ -3615,7 +3594,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal") |
| + DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral) |
| private: |
| Handle<FixedArray> constant_properties_; |
| @@ -3640,7 +3619,7 @@ |
| return Representation::None(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp_literal") |
| + DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral) |
| private: |
| Handle<String> pattern_; |
| @@ -3659,7 +3638,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 +3659,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
| + DECLARE_CONCRETE_INSTRUCTION(Typeof) |
| }; |
| @@ -3698,7 +3677,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to_fast_properties") |
| + DECLARE_CONCRETE_INSTRUCTION(ToFastProperties) |
| }; |
| @@ -3712,7 +3691,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value_of") |
| + DECLARE_CONCRETE_INSTRUCTION(ValueOf) |
| }; |
| @@ -3728,7 +3707,7 @@ |
| return Representation::Tagged(); |
| } |
| - DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete_property") |
| + DECLARE_CONCRETE_INSTRUCTION(DeleteProperty) |
| HValue* object() { return left(); } |
| HValue* key() { return right(); } |