OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 V(CallKeyed) \ | 59 V(CallKeyed) \ |
60 V(CallKnownGlobal) \ | 60 V(CallKnownGlobal) \ |
61 V(CallNamed) \ | 61 V(CallNamed) \ |
62 V(CallNew) \ | 62 V(CallNew) \ |
63 V(CallNewArray) \ | 63 V(CallNewArray) \ |
64 V(CallRuntime) \ | 64 V(CallRuntime) \ |
65 V(CallStub) \ | 65 V(CallStub) \ |
66 V(CheckFunction) \ | 66 V(CheckFunction) \ |
67 V(CheckInstanceType) \ | 67 V(CheckInstanceType) \ |
68 V(CheckMaps) \ | 68 V(CheckMaps) \ |
| 69 V(CheckMapValue) \ |
69 V(CheckNonSmi) \ | 70 V(CheckNonSmi) \ |
70 V(CheckPrototypeMaps) \ | 71 V(CheckPrototypeMaps) \ |
71 V(CheckSmi) \ | 72 V(CheckSmi) \ |
72 V(ClampDToUint8) \ | 73 V(ClampDToUint8) \ |
73 V(ClampIToUint8) \ | 74 V(ClampIToUint8) \ |
74 V(ClampTToUint8) \ | 75 V(ClampTToUint8) \ |
75 V(ClampTToUint8NoSSE2) \ | 76 V(ClampTToUint8NoSSE2) \ |
76 V(ClassOfTestAndBranch) \ | 77 V(ClassOfTestAndBranch) \ |
77 V(CompareNumericAndBranch) \ | 78 V(CompareNumericAndBranch) \ |
78 V(CmpObjectEqAndBranch) \ | 79 V(CmpObjectEqAndBranch) \ |
79 V(CmpMapAndBranch) \ | 80 V(CmpMapAndBranch) \ |
80 V(CmpT) \ | 81 V(CmpT) \ |
81 V(CmpConstantEqAndBranch) \ | |
82 V(ConstantD) \ | 82 V(ConstantD) \ |
83 V(ConstantI) \ | 83 V(ConstantI) \ |
84 V(ConstantS) \ | 84 V(ConstantS) \ |
85 V(ConstantT) \ | 85 V(ConstantT) \ |
86 V(Context) \ | 86 V(Context) \ |
| 87 V(DateField) \ |
87 V(DebugBreak) \ | 88 V(DebugBreak) \ |
88 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
89 V(Deoptimize) \ | 90 V(Deoptimize) \ |
90 V(DivI) \ | 91 V(DivI) \ |
91 V(DoubleToI) \ | 92 V(DoubleToI) \ |
92 V(DoubleToSmi) \ | 93 V(DoubleToSmi) \ |
| 94 V(Drop) \ |
93 V(DummyUse) \ | 95 V(DummyUse) \ |
94 V(ElementsKind) \ | 96 V(ElementsKind) \ |
| 97 V(ForInCacheArray) \ |
| 98 V(ForInPrepareMap) \ |
95 V(FunctionLiteral) \ | 99 V(FunctionLiteral) \ |
96 V(GetCachedArrayIndex) \ | 100 V(GetCachedArrayIndex) \ |
97 V(GlobalObject) \ | 101 V(GlobalObject) \ |
98 V(GlobalReceiver) \ | 102 V(GlobalReceiver) \ |
99 V(Goto) \ | 103 V(Goto) \ |
100 V(HasCachedArrayIndexAndBranch) \ | 104 V(HasCachedArrayIndexAndBranch) \ |
101 V(HasInstanceTypeAndBranch) \ | 105 V(HasInstanceTypeAndBranch) \ |
| 106 V(InnerAllocatedObject) \ |
102 V(InstanceOf) \ | 107 V(InstanceOf) \ |
103 V(InstanceOfKnownGlobal) \ | 108 V(InstanceOfKnownGlobal) \ |
104 V(InstanceSize) \ | 109 V(InstanceSize) \ |
105 V(InstructionGap) \ | 110 V(InstructionGap) \ |
106 V(Integer32ToDouble) \ | 111 V(Integer32ToDouble) \ |
107 V(Integer32ToSmi) \ | 112 V(Integer32ToSmi) \ |
108 V(Uint32ToDouble) \ | |
109 V(InvokeFunction) \ | 113 V(InvokeFunction) \ |
110 V(IsConstructCallAndBranch) \ | 114 V(IsConstructCallAndBranch) \ |
111 V(IsObjectAndBranch) \ | 115 V(IsObjectAndBranch) \ |
112 V(IsStringAndBranch) \ | 116 V(IsStringAndBranch) \ |
113 V(IsSmiAndBranch) \ | 117 V(IsSmiAndBranch) \ |
114 V(IsNumberAndBranch) \ | 118 V(IsNumberAndBranch) \ |
115 V(IsUndetectableAndBranch) \ | 119 V(IsUndetectableAndBranch) \ |
116 V(Label) \ | 120 V(Label) \ |
117 V(LazyBailout) \ | 121 V(LazyBailout) \ |
118 V(LinkObjectInList) \ | 122 V(LinkObjectInList) \ |
119 V(LoadContextSlot) \ | 123 V(LoadContextSlot) \ |
120 V(LoadExternalArrayPointer) \ | 124 V(LoadExternalArrayPointer) \ |
| 125 V(LoadFieldByIndex) \ |
121 V(LoadFunctionPrototype) \ | 126 V(LoadFunctionPrototype) \ |
122 V(LoadGlobalCell) \ | 127 V(LoadGlobalCell) \ |
123 V(LoadGlobalGeneric) \ | 128 V(LoadGlobalGeneric) \ |
124 V(LoadKeyed) \ | 129 V(LoadKeyed) \ |
125 V(LoadKeyedGeneric) \ | 130 V(LoadKeyedGeneric) \ |
126 V(LoadNamedField) \ | 131 V(LoadNamedField) \ |
127 V(LoadNamedFieldPolymorphic) \ | 132 V(LoadNamedFieldPolymorphic) \ |
128 V(LoadNamedGeneric) \ | 133 V(LoadNamedGeneric) \ |
129 V(MapEnumLength) \ | 134 V(MapEnumLength) \ |
130 V(MathAbs) \ | 135 V(MathAbs) \ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 V(SubI) \ | 178 V(SubI) \ |
174 V(TaggedToI) \ | 179 V(TaggedToI) \ |
175 V(TaggedToINoSSE2) \ | 180 V(TaggedToINoSSE2) \ |
176 V(ThisFunction) \ | 181 V(ThisFunction) \ |
177 V(Throw) \ | 182 V(Throw) \ |
178 V(ToFastProperties) \ | 183 V(ToFastProperties) \ |
179 V(TransitionElementsKind) \ | 184 V(TransitionElementsKind) \ |
180 V(TrapAllocationMemento) \ | 185 V(TrapAllocationMemento) \ |
181 V(Typeof) \ | 186 V(Typeof) \ |
182 V(TypeofIsAndBranch) \ | 187 V(TypeofIsAndBranch) \ |
| 188 V(Uint32ToDouble) \ |
183 V(UnknownOSRValue) \ | 189 V(UnknownOSRValue) \ |
184 V(ValueOf) \ | 190 V(ValueOf) \ |
185 V(ForInPrepareMap) \ | 191 V(WrapReceiver) |
186 V(ForInCacheArray) \ | |
187 V(CheckMapValue) \ | |
188 V(LoadFieldByIndex) \ | |
189 V(DateField) \ | |
190 V(WrapReceiver) \ | |
191 V(Drop) \ | |
192 V(InnerAllocatedObject) | |
193 | 192 |
194 | 193 |
195 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 194 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
196 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 195 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
197 virtual void CompileToNative(LCodeGen* generator); \ | 196 virtual void CompileToNative(LCodeGen* generator); \ |
198 virtual const char* Mnemonic() const { return mnemonic; } \ | 197 virtual const char* Mnemonic() const { return mnemonic; } \ |
199 static L##type* cast(LInstruction* instr) { \ | 198 static L##type* cast(LInstruction* instr) { \ |
200 ASSERT(instr->Is##type()); \ | 199 ASSERT(instr->Is##type()); \ |
201 return reinterpret_cast<L##type*>(instr); \ | 200 return reinterpret_cast<L##type*>(instr); \ |
202 } | 201 } |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 explicit LDummyUse(LOperand* value) { | 416 explicit LDummyUse(LOperand* value) { |
418 inputs_[0] = value; | 417 inputs_[0] = value; |
419 } | 418 } |
420 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") | 419 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") |
421 }; | 420 }; |
422 | 421 |
423 | 422 |
424 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { | 423 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { |
425 public: | 424 public: |
426 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 425 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 426 DECLARE_HYDROGEN_ACCESSOR(Deoptimize) |
427 }; | 427 }; |
428 | 428 |
429 | 429 |
430 class LLabel: public LGap { | 430 class LLabel: public LGap { |
431 public: | 431 public: |
432 explicit LLabel(HBasicBlock* block) | 432 explicit LLabel(HBasicBlock* block) |
433 : LGap(block), replacement_(NULL) { } | 433 : LGap(block), replacement_(NULL) { } |
434 | 434 |
435 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } | 435 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } |
436 DECLARE_CONCRETE_INSTRUCTION(Label, "label") | 436 DECLARE_CONCRETE_INSTRUCTION(Label, "label") |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 } | 850 } |
851 | 851 |
852 LOperand* left() { return inputs_[0]; } | 852 LOperand* left() { return inputs_[0]; } |
853 LOperand* right() { return inputs_[1]; } | 853 LOperand* right() { return inputs_[1]; } |
854 | 854 |
855 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, | 855 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, |
856 "cmp-object-eq-and-branch") | 856 "cmp-object-eq-and-branch") |
857 }; | 857 }; |
858 | 858 |
859 | 859 |
860 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { | |
861 public: | |
862 explicit LCmpConstantEqAndBranch(LOperand* left) { | |
863 inputs_[0] = left; | |
864 } | |
865 | |
866 LOperand* left() { return inputs_[0]; } | |
867 | |
868 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, | |
869 "cmp-constant-eq-and-branch") | |
870 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) | |
871 }; | |
872 | |
873 | |
874 class LIsObjectAndBranch: public LControlInstruction<1, 1> { | 860 class LIsObjectAndBranch: public LControlInstruction<1, 1> { |
875 public: | 861 public: |
876 LIsObjectAndBranch(LOperand* value, LOperand* temp) { | 862 LIsObjectAndBranch(LOperand* value, LOperand* temp) { |
877 inputs_[0] = value; | 863 inputs_[0] = value; |
878 temps_[0] = temp; | 864 temps_[0] = temp; |
879 } | 865 } |
880 | 866 |
881 LOperand* value() { return inputs_[0]; } | 867 LOperand* value() { return inputs_[0]; } |
882 LOperand* temp() { return temps_[0]; } | 868 LOperand* temp() { return temps_[0]; } |
883 | 869 |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2954 | 2940 |
2955 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2941 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2956 }; | 2942 }; |
2957 | 2943 |
2958 #undef DECLARE_HYDROGEN_ACCESSOR | 2944 #undef DECLARE_HYDROGEN_ACCESSOR |
2959 #undef DECLARE_CONCRETE_INSTRUCTION | 2945 #undef DECLARE_CONCRETE_INSTRUCTION |
2960 | 2946 |
2961 } } // namespace v8::internal | 2947 } } // namespace v8::internal |
2962 | 2948 |
2963 #endif // V8_IA32_LITHIUM_IA32_H_ | 2949 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |