OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 26 matching lines...) Expand all Loading... |
37 namespace internal { | 37 namespace internal { |
38 | 38 |
39 // Forward declarations. | 39 // Forward declarations. |
40 class LCodeGen; | 40 class LCodeGen; |
41 | 41 |
42 | 42 |
43 // Type hierarchy: | 43 // Type hierarchy: |
44 // | 44 // |
45 // LInstruction | 45 // LInstruction |
46 // LTemplateInstruction | 46 // LTemplateInstruction |
| 47 // LAccessArgumentsAt |
| 48 // LAddI |
| 49 // LApplyArguments |
| 50 // LArgumentsElements |
| 51 // LArgumentsLength |
| 52 // LArithmeticD |
| 53 // LArithmeticT |
| 54 // LArrayLiteral |
| 55 // LBitI |
| 56 // LBitNotI |
| 57 // LBoundsCheck |
| 58 // LCallConstantFunction |
| 59 // LCallFunction |
| 60 // LCallGlobal |
| 61 // LCallKeyed |
| 62 // LCallKnownGlobal |
| 63 // LCallNamed |
| 64 // LCallNew |
| 65 // LCallRuntime |
| 66 // LCallStub |
| 67 // LCheckFunction |
| 68 // LCheckInstanceType |
| 69 // LCheckMap |
| 70 // LCheckPrototypeMaps |
| 71 // LCheckPrototypeMaps |
| 72 // LCheckSmi |
| 73 // LClassOfTest |
| 74 // LCmpID |
| 75 // LCmpJSObjectEq |
| 76 // LCmpT |
| 77 // LConstant |
| 78 // LConstantD |
| 79 // LConstantI |
| 80 // LConstantT |
| 81 // LContext |
47 // LControlInstruction | 82 // LControlInstruction |
48 // LBranch | 83 // LBranch |
49 // LClassOfTestAndBranch | 84 // LClassOfTestAndBranch |
| 85 // LCmpIDAndBranch |
50 // LCmpJSObjectEqAndBranch | 86 // LCmpJSObjectEqAndBranch |
51 // LCmpIDAndBranch | |
52 // LHasCachedArrayIndexAndBranch | 87 // LHasCachedArrayIndexAndBranch |
53 // LHasInstanceTypeAndBranch | 88 // LHasInstanceTypeAndBranch |
54 // LInstanceOfAndBranch | 89 // LInstanceOfAndBranch |
55 // LIsNullAndBranch | 90 // LIsNullAndBranch |
56 // LIsObjectAndBranch | 91 // LIsObjectAndBranch |
57 // LIsSmiAndBranch | 92 // LIsSmiAndBranch |
58 // LTypeofIsAndBranch | 93 // LTypeofIsAndBranch |
59 // LAccessArgumentsAt | 94 // LDeleteProperty |
60 // LArgumentsElements | 95 // LDeoptimize |
61 // LArgumentsLength | |
62 // LAddI | |
63 // LApplyArguments | |
64 // LArithmeticD | |
65 // LArithmeticT | |
66 // LBitI | |
67 // LBoundsCheck | |
68 // LCmpID | |
69 // LCmpJSObjectEq | |
70 // LCmpT | |
71 // LDivI | 96 // LDivI |
72 // LInstanceOf | 97 // LDoubleToI |
73 // LInstanceOfKnownGlobal | 98 // LFixedArrayLength |
74 // LLoadKeyedFastElement | |
75 // LLoadKeyedGeneric | |
76 // LModI | |
77 // LMulI | |
78 // LPower | |
79 // LShiftI | |
80 // LSubI | |
81 // LCallConstantFunction | |
82 // LCallFunction | |
83 // LCallGlobal | |
84 // LCallKeyed | |
85 // LCallKnownGlobal | |
86 // LCallNamed | |
87 // LCallRuntime | |
88 // LCallStub | |
89 // LConstant | |
90 // LConstantD | |
91 // LConstantI | |
92 // LConstantT | |
93 // LDeoptimize | |
94 // LFunctionLiteral | 99 // LFunctionLiteral |
95 // LGap | 100 // LGap |
96 // LLabel | 101 // LLabel |
97 // LGlobalObject | 102 // LGlobalObject |
98 // LGlobalReceiver | 103 // LGlobalReceiver |
99 // LGoto | 104 // LGoto |
| 105 // LHasCachedArrayIndex |
| 106 // LHasInstanceType |
| 107 // LInstanceOf |
| 108 // LInstanceOfKnownGlobal |
| 109 // LInteger32ToDouble |
| 110 // LIsNull |
| 111 // LIsObject |
| 112 // LIsSmi |
| 113 // LJSArrayLength |
100 // LLazyBailout | 114 // LLazyBailout |
| 115 // LLoadContextSlot |
| 116 // LLoadFunctionPrototype |
101 // LLoadGlobal | 117 // LLoadGlobal |
102 // LCheckPrototypeMaps | 118 // LLoadKeyedFastElement |
103 // LLoadContextSlot | 119 // LLoadKeyedGeneric |
104 // LArrayLiteral | 120 // LLoadNamedField |
| 121 // LLoadNamedGeneric |
| 122 // LModI |
| 123 // LMulI |
| 124 // LNumberTagD |
| 125 // LNumberTagI |
105 // LObjectLiteral | 126 // LObjectLiteral |
| 127 // LOsrEntry |
| 128 // LOuterContext |
| 129 // LParameter |
| 130 // LPower |
| 131 // LPushArgument |
| 132 // LRegExpConstructResult |
106 // LRegExpLiteral | 133 // LRegExpLiteral |
107 // LOsrEntry | 134 // LReturn |
108 // LParameter | 135 // LShiftI |
109 // LRegExpConstructResult | 136 // LSmiTag |
110 // LStackCheck | 137 // LStackCheck |
| 138 // LSubI |
| 139 // LStoreContextSlot |
| 140 // LStoreGlobal |
111 // LStoreKeyed | 141 // LStoreKeyed |
112 // LStoreKeyedFastElement | 142 // LStoreKeyedFastElement |
113 // LStoreKeyedGeneric | 143 // LStoreKeyedGeneric |
114 // LStoreNamed | 144 // LStoreNamed |
115 // LStoreNamedField | 145 // LStoreNamedField |
116 // LStoreNamedGeneric | 146 // LStoreNamedGeneric |
117 // LStringCharCodeAt | 147 // LStringCharCodeAt |
118 // LBitNotI | |
119 // LCallNew | |
120 // LCheckFunction | |
121 // LCheckPrototypeMaps | |
122 // LCheckInstanceType | |
123 // LCheckMap | |
124 // LCheckSmi | |
125 // LClassOfTest | |
126 // LDeleteProperty | |
127 // LDoubleToI | |
128 // LFixedArrayLength | |
129 // LHasCachedArrayIndex | |
130 // LHasInstanceType | |
131 // LInteger32ToDouble | |
132 // LIsNull | |
133 // LIsObject | |
134 // LIsSmi | |
135 // LJSArrayLength | |
136 // LLoadNamedField | |
137 // LLoadNamedGeneric | |
138 // LLoadFunctionPrototype | |
139 // LNumberTagD | |
140 // LNumberTagI | |
141 // LPushArgument | |
142 // LReturn | |
143 // LSmiTag | |
144 // LStoreGlobal | |
145 // LStringLength | 148 // LStringLength |
146 // LTaggedToI | 149 // LTaggedToI |
147 // LThrow | 150 // LThrow |
148 // LTypeof | 151 // LTypeof |
149 // LTypeofIs | 152 // LTypeofIs |
150 // LUnaryMathOperation | 153 // LUnaryMathOperation |
| 154 // LUnknownOSRValue |
151 // LValueOf | 155 // LValueOf |
152 // LUnknownOSRValue | |
153 | 156 |
154 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ | 157 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ |
155 V(ControlInstruction) \ | 158 V(ControlInstruction) \ |
156 V(Constant) \ | 159 V(Constant) \ |
157 V(Call) \ | 160 V(Call) \ |
158 V(StoreKeyed) \ | 161 V(StoreKeyed) \ |
159 V(StoreNamed) \ | 162 V(StoreNamed) \ |
160 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) | 163 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) |
161 | 164 |
162 | 165 |
(...skipping 27 matching lines...) Expand all Loading... |
190 V(CmpID) \ | 193 V(CmpID) \ |
191 V(CmpIDAndBranch) \ | 194 V(CmpIDAndBranch) \ |
192 V(CmpJSObjectEq) \ | 195 V(CmpJSObjectEq) \ |
193 V(CmpJSObjectEqAndBranch) \ | 196 V(CmpJSObjectEqAndBranch) \ |
194 V(CmpMapAndBranch) \ | 197 V(CmpMapAndBranch) \ |
195 V(CmpT) \ | 198 V(CmpT) \ |
196 V(CmpTAndBranch) \ | 199 V(CmpTAndBranch) \ |
197 V(ConstantD) \ | 200 V(ConstantD) \ |
198 V(ConstantI) \ | 201 V(ConstantI) \ |
199 V(ConstantT) \ | 202 V(ConstantT) \ |
| 203 V(Context) \ |
200 V(DeleteProperty) \ | 204 V(DeleteProperty) \ |
201 V(Deoptimize) \ | 205 V(Deoptimize) \ |
202 V(DivI) \ | 206 V(DivI) \ |
203 V(DoubleToI) \ | 207 V(DoubleToI) \ |
204 V(FunctionLiteral) \ | 208 V(FunctionLiteral) \ |
205 V(Gap) \ | 209 V(Gap) \ |
206 V(GlobalObject) \ | 210 V(GlobalObject) \ |
207 V(GlobalReceiver) \ | 211 V(GlobalReceiver) \ |
208 V(Goto) \ | 212 V(Goto) \ |
209 V(FixedArrayLength) \ | 213 V(FixedArrayLength) \ |
(...skipping 24 matching lines...) Expand all Loading... |
234 V(LoadNamedField) \ | 238 V(LoadNamedField) \ |
235 V(LoadNamedGeneric) \ | 239 V(LoadNamedGeneric) \ |
236 V(LoadFunctionPrototype) \ | 240 V(LoadFunctionPrototype) \ |
237 V(ModI) \ | 241 V(ModI) \ |
238 V(MulI) \ | 242 V(MulI) \ |
239 V(NumberTagD) \ | 243 V(NumberTagD) \ |
240 V(NumberTagI) \ | 244 V(NumberTagI) \ |
241 V(NumberUntagD) \ | 245 V(NumberUntagD) \ |
242 V(ObjectLiteral) \ | 246 V(ObjectLiteral) \ |
243 V(OsrEntry) \ | 247 V(OsrEntry) \ |
| 248 V(OuterContext) \ |
244 V(Parameter) \ | 249 V(Parameter) \ |
245 V(Power) \ | 250 V(Power) \ |
246 V(PushArgument) \ | 251 V(PushArgument) \ |
247 V(RegExpLiteral) \ | 252 V(RegExpLiteral) \ |
248 V(Return) \ | 253 V(Return) \ |
249 V(ShiftI) \ | 254 V(ShiftI) \ |
250 V(SmiTag) \ | 255 V(SmiTag) \ |
251 V(SmiUntag) \ | 256 V(SmiUntag) \ |
252 V(StackCheck) \ | 257 V(StackCheck) \ |
| 258 V(StoreContextSlot) \ |
253 V(StoreGlobal) \ | 259 V(StoreGlobal) \ |
254 V(StoreKeyedFastElement) \ | 260 V(StoreKeyedFastElement) \ |
255 V(StoreKeyedGeneric) \ | 261 V(StoreKeyedGeneric) \ |
256 V(StoreNamedField) \ | 262 V(StoreNamedField) \ |
257 V(StoreNamedGeneric) \ | 263 V(StoreNamedGeneric) \ |
258 V(StringCharCodeAt) \ | 264 V(StringCharCodeAt) \ |
259 V(StringLength) \ | 265 V(StringLength) \ |
260 V(SubI) \ | 266 V(SubI) \ |
261 V(TaggedToI) \ | 267 V(TaggedToI) \ |
262 V(Throw) \ | 268 V(Throw) \ |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 public: | 1285 public: |
1280 explicit LStoreGlobal(LOperand* value) { | 1286 explicit LStoreGlobal(LOperand* value) { |
1281 inputs_[0] = value; | 1287 inputs_[0] = value; |
1282 } | 1288 } |
1283 | 1289 |
1284 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store-global") | 1290 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store-global") |
1285 DECLARE_HYDROGEN_ACCESSOR(StoreGlobal) | 1291 DECLARE_HYDROGEN_ACCESSOR(StoreGlobal) |
1286 }; | 1292 }; |
1287 | 1293 |
1288 | 1294 |
1289 class LLoadContextSlot: public LTemplateInstruction<1, 0, 0> { | 1295 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { |
1290 public: | 1296 public: |
| 1297 explicit LLoadContextSlot(LOperand* context) { |
| 1298 inputs_[0] = context; |
| 1299 } |
| 1300 |
1291 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1301 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
1292 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1302 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
1293 | 1303 |
1294 int context_chain_length() { return hydrogen()->context_chain_length(); } | |
1295 int slot_index() { return hydrogen()->slot_index(); } | 1304 int slot_index() { return hydrogen()->slot_index(); } |
1296 | 1305 |
1297 virtual void PrintDataTo(StringStream* stream); | 1306 virtual void PrintDataTo(StringStream* stream); |
| 1307 }; |
| 1308 |
| 1309 |
| 1310 class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { |
| 1311 public: |
| 1312 explicit LStoreContextSlot(LOperand* context, |
| 1313 LOperand* value, |
| 1314 LOperand* temp) { |
| 1315 inputs_[0] = context; |
| 1316 inputs_[1] = value; |
| 1317 temps_[0] = temp; |
| 1318 } |
| 1319 |
| 1320 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |
| 1321 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |
| 1322 |
| 1323 int slot_index() { return hydrogen()->slot_index(); } |
| 1324 |
| 1325 virtual void PrintDataTo(StringStream* stream); |
1298 }; | 1326 }; |
1299 | 1327 |
1300 | 1328 |
1301 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 1329 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
1302 public: | 1330 public: |
1303 explicit LPushArgument(LOperand* value) { | 1331 explicit LPushArgument(LOperand* value) { |
1304 inputs_[0] = value; | 1332 inputs_[0] = value; |
1305 } | 1333 } |
1306 | 1334 |
1307 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1335 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
1308 }; | 1336 }; |
1309 | 1337 |
1310 | 1338 |
1311 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { | 1339 class LContext: public LTemplateInstruction<1, 0, 0> { |
1312 public: | 1340 public: |
| 1341 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1342 }; |
| 1343 |
| 1344 |
| 1345 class LOuterContext: public LTemplateInstruction<1, 1, 0> { |
| 1346 public: |
| 1347 explicit LOuterContext(LOperand* context) { |
| 1348 inputs_[0] = context; |
| 1349 } |
| 1350 |
| 1351 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") |
| 1352 }; |
| 1353 |
| 1354 |
| 1355 class LGlobalObject: public LTemplateInstruction<1, 1, 0> { |
| 1356 public: |
| 1357 explicit LGlobalObject(LOperand* context) { |
| 1358 inputs_[0] = context; |
| 1359 } |
| 1360 |
1313 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | 1361 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") |
1314 }; | 1362 }; |
1315 | 1363 |
1316 | 1364 |
1317 class LGlobalReceiver: public LTemplateInstruction<1, 0, 0> { | 1365 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { |
1318 public: | 1366 public: |
| 1367 explicit LGlobalReceiver(LOperand* global_object) { |
| 1368 inputs_[0] = global_object; |
| 1369 } |
| 1370 |
1319 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | 1371 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") |
1320 }; | 1372 }; |
1321 | 1373 |
1322 | 1374 |
1323 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { | 1375 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { |
1324 public: | 1376 public: |
1325 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") | 1377 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") |
1326 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) | 1378 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) |
1327 | 1379 |
1328 virtual void PrintDataTo(StringStream* stream); | 1380 virtual void PrintDataTo(StringStream* stream); |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2073 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2022 }; | 2074 }; |
2023 | 2075 |
2024 #undef DECLARE_HYDROGEN_ACCESSOR | 2076 #undef DECLARE_HYDROGEN_ACCESSOR |
2025 #undef DECLARE_INSTRUCTION | 2077 #undef DECLARE_INSTRUCTION |
2026 #undef DECLARE_CONCRETE_INSTRUCTION | 2078 #undef DECLARE_CONCRETE_INSTRUCTION |
2027 | 2079 |
2028 } } // namespace v8::internal | 2080 } } // namespace v8::internal |
2029 | 2081 |
2030 #endif // V8_IA32_LITHIUM_IA32_H_ | 2082 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |