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 22 matching lines...) Expand all Loading... |
33 #include "lithium.h" | 33 #include "lithium.h" |
34 #include "safepoint-table.h" | 34 #include "safepoint-table.h" |
35 #include "utils.h" | 35 #include "utils.h" |
36 | 36 |
37 namespace v8 { | 37 namespace v8 { |
38 namespace internal { | 38 namespace internal { |
39 | 39 |
40 // Forward declarations. | 40 // Forward declarations. |
41 class LCodeGen; | 41 class LCodeGen; |
42 | 42 |
43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ | |
44 V(ControlInstruction) \ | |
45 V(Call) \ | |
46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) | |
47 | |
48 | |
49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ | 43 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ |
50 V(AccessArgumentsAt) \ | 44 V(AccessArgumentsAt) \ |
51 V(AddI) \ | 45 V(AddI) \ |
52 V(Allocate) \ | 46 V(Allocate) \ |
53 V(ApplyArguments) \ | 47 V(ApplyArguments) \ |
54 V(ArgumentsElements) \ | 48 V(ArgumentsElements) \ |
55 V(ArgumentsLength) \ | 49 V(ArgumentsLength) \ |
56 V(ArithmeticD) \ | 50 V(ArithmeticD) \ |
57 V(ArithmeticT) \ | 51 V(ArithmeticT) \ |
58 V(BitI) \ | 52 V(BitI) \ |
59 V(BitNotI) \ | 53 V(BitNotI) \ |
60 V(BoundsCheck) \ | 54 V(BoundsCheck) \ |
61 V(Branch) \ | 55 V(Branch) \ |
62 V(CallConstantFunction) \ | 56 V(CallConstantFunction) \ |
63 V(CallFunction) \ | 57 V(CallFunction) \ |
64 V(CallGlobal) \ | 58 V(CallGlobal) \ |
65 V(CallKeyed) \ | 59 V(CallKeyed) \ |
66 V(CallKnownGlobal) \ | 60 V(CallKnownGlobal) \ |
67 V(CallNamed) \ | 61 V(CallNamed) \ |
68 V(CallNew) \ | 62 V(CallNew) \ |
69 V(CallNewArray) \ | 63 V(CallNewArray) \ |
70 V(CallRuntime) \ | 64 V(CallRuntime) \ |
71 V(CallStub) \ | 65 V(CallStub) \ |
72 V(CheckFunction) \ | 66 V(CheckFunction) \ |
73 V(CheckInstanceType) \ | 67 V(CheckInstanceType) \ |
74 V(CheckNonSmi) \ | 68 V(CheckNonSmi) \ |
75 V(CheckMaps) \ | 69 V(CheckMaps) \ |
| 70 V(CheckMapValue) \ |
76 V(CheckPrototypeMaps) \ | 71 V(CheckPrototypeMaps) \ |
77 V(CheckSmi) \ | 72 V(CheckSmi) \ |
78 V(ClampDToUint8) \ | 73 V(ClampDToUint8) \ |
79 V(ClampIToUint8) \ | 74 V(ClampIToUint8) \ |
80 V(ClampTToUint8) \ | 75 V(ClampTToUint8) \ |
81 V(ClassOfTestAndBranch) \ | 76 V(ClassOfTestAndBranch) \ |
82 V(CmpConstantEqAndBranch) \ | 77 V(CmpConstantEqAndBranch) \ |
83 V(CompareNumericAndBranch) \ | 78 V(CompareNumericAndBranch) \ |
84 V(CmpObjectEqAndBranch) \ | 79 V(CmpObjectEqAndBranch) \ |
85 V(CmpMapAndBranch) \ | 80 V(CmpMapAndBranch) \ |
86 V(CmpT) \ | 81 V(CmpT) \ |
87 V(ConstantD) \ | 82 V(ConstantD) \ |
88 V(ConstantI) \ | 83 V(ConstantI) \ |
89 V(ConstantS) \ | 84 V(ConstantS) \ |
90 V(ConstantT) \ | 85 V(ConstantT) \ |
91 V(Context) \ | 86 V(Context) \ |
| 87 V(DateField) \ |
92 V(DebugBreak) \ | 88 V(DebugBreak) \ |
93 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
94 V(Deoptimize) \ | 90 V(Deoptimize) \ |
95 V(DivI) \ | 91 V(DivI) \ |
96 V(DoubleToI) \ | 92 V(DoubleToI) \ |
97 V(DoubleToSmi) \ | 93 V(DoubleToSmi) \ |
| 94 V(Drop) \ |
98 V(DummyUse) \ | 95 V(DummyUse) \ |
99 V(ElementsKind) \ | 96 V(ElementsKind) \ |
| 97 V(ForInCacheArray) \ |
| 98 V(ForInPrepareMap) \ |
100 V(FunctionLiteral) \ | 99 V(FunctionLiteral) \ |
101 V(GetCachedArrayIndex) \ | 100 V(GetCachedArrayIndex) \ |
102 V(GlobalObject) \ | 101 V(GlobalObject) \ |
103 V(GlobalReceiver) \ | 102 V(GlobalReceiver) \ |
104 V(Goto) \ | 103 V(Goto) \ |
105 V(HasCachedArrayIndexAndBranch) \ | 104 V(HasCachedArrayIndexAndBranch) \ |
106 V(HasInstanceTypeAndBranch) \ | 105 V(HasInstanceTypeAndBranch) \ |
| 106 V(InnerAllocatedObject) \ |
107 V(InstanceOf) \ | 107 V(InstanceOf) \ |
108 V(InstanceOfKnownGlobal) \ | 108 V(InstanceOfKnownGlobal) \ |
109 V(InstanceSize) \ | 109 V(InstanceSize) \ |
110 V(InstructionGap) \ | 110 V(InstructionGap) \ |
111 V(Integer32ToDouble) \ | 111 V(Integer32ToDouble) \ |
112 V(Integer32ToSmi) \ | 112 V(Integer32ToSmi) \ |
113 V(Uint32ToDouble) \ | |
114 V(InvokeFunction) \ | 113 V(InvokeFunction) \ |
115 V(IsConstructCallAndBranch) \ | 114 V(IsConstructCallAndBranch) \ |
116 V(IsObjectAndBranch) \ | 115 V(IsObjectAndBranch) \ |
117 V(IsStringAndBranch) \ | 116 V(IsStringAndBranch) \ |
118 V(IsNumberAndBranch) \ | 117 V(IsNumberAndBranch) \ |
119 V(IsSmiAndBranch) \ | 118 V(IsSmiAndBranch) \ |
120 V(IsUndetectableAndBranch) \ | 119 V(IsUndetectableAndBranch) \ |
121 V(Label) \ | 120 V(Label) \ |
122 V(LazyBailout) \ | 121 V(LazyBailout) \ |
123 V(LinkObjectInList) \ | 122 V(LinkObjectInList) \ |
124 V(LoadContextSlot) \ | 123 V(LoadContextSlot) \ |
125 V(LoadExternalArrayPointer) \ | 124 V(LoadExternalArrayPointer) \ |
| 125 V(LoadFieldByIndex) \ |
126 V(LoadFunctionPrototype) \ | 126 V(LoadFunctionPrototype) \ |
127 V(LoadGlobalCell) \ | 127 V(LoadGlobalCell) \ |
128 V(LoadGlobalGeneric) \ | 128 V(LoadGlobalGeneric) \ |
129 V(LoadKeyed) \ | 129 V(LoadKeyed) \ |
130 V(LoadKeyedGeneric) \ | 130 V(LoadKeyedGeneric) \ |
131 V(LoadNamedField) \ | 131 V(LoadNamedField) \ |
132 V(LoadNamedFieldPolymorphic) \ | 132 V(LoadNamedFieldPolymorphic) \ |
133 V(LoadNamedGeneric) \ | 133 V(LoadNamedGeneric) \ |
134 V(MapEnumLength) \ | 134 V(MapEnumLength) \ |
135 V(MathAbs) \ | 135 V(MathAbs) \ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 V(SubI) \ | 180 V(SubI) \ |
181 V(RSubI) \ | 181 V(RSubI) \ |
182 V(TaggedToI) \ | 182 V(TaggedToI) \ |
183 V(ThisFunction) \ | 183 V(ThisFunction) \ |
184 V(Throw) \ | 184 V(Throw) \ |
185 V(ToFastProperties) \ | 185 V(ToFastProperties) \ |
186 V(TransitionElementsKind) \ | 186 V(TransitionElementsKind) \ |
187 V(TrapAllocationMemento) \ | 187 V(TrapAllocationMemento) \ |
188 V(Typeof) \ | 188 V(Typeof) \ |
189 V(TypeofIsAndBranch) \ | 189 V(TypeofIsAndBranch) \ |
| 190 V(Uint32ToDouble) \ |
190 V(UnknownOSRValue) \ | 191 V(UnknownOSRValue) \ |
191 V(ValueOf) \ | 192 V(ValueOf) \ |
192 V(ForInPrepareMap) \ | 193 V(WrapReceiver) |
193 V(ForInCacheArray) \ | |
194 V(CheckMapValue) \ | |
195 V(LoadFieldByIndex) \ | |
196 V(DateField) \ | |
197 V(WrapReceiver) \ | |
198 V(Drop) \ | |
199 V(InnerAllocatedObject) | |
200 | 194 |
201 | 195 |
202 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 196 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
203 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 197 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
204 virtual void CompileToNative(LCodeGen* generator); \ | 198 virtual void CompileToNative(LCodeGen* generator); \ |
205 virtual const char* Mnemonic() const { return mnemonic; } \ | 199 virtual const char* Mnemonic() const { return mnemonic; } \ |
206 static L##type* cast(LInstruction* instr) { \ | 200 static L##type* cast(LInstruction* instr) { \ |
207 ASSERT(instr->Is##type()); \ | 201 ASSERT(instr->Is##type()); \ |
208 return reinterpret_cast<L##type*>(instr); \ | 202 return reinterpret_cast<L##type*>(instr); \ |
209 } | 203 } |
(...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 | 2818 |
2825 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2819 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2826 }; | 2820 }; |
2827 | 2821 |
2828 #undef DECLARE_HYDROGEN_ACCESSOR | 2822 #undef DECLARE_HYDROGEN_ACCESSOR |
2829 #undef DECLARE_CONCRETE_INSTRUCTION | 2823 #undef DECLARE_CONCRETE_INSTRUCTION |
2830 | 2824 |
2831 } } // namespace v8::internal | 2825 } } // namespace v8::internal |
2832 | 2826 |
2833 #endif // V8_ARM_LITHIUM_ARM_H_ | 2827 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |