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 161 matching lines...) Loading... |
172 V(Typeof) \ | 172 V(Typeof) \ |
173 V(TypeofIsAndBranch) \ | 173 V(TypeofIsAndBranch) \ |
174 V(UnaryMathOperation) \ | 174 V(UnaryMathOperation) \ |
175 V(UnknownOSRValue) \ | 175 V(UnknownOSRValue) \ |
176 V(ValueOf) \ | 176 V(ValueOf) \ |
177 V(ForInPrepareMap) \ | 177 V(ForInPrepareMap) \ |
178 V(ForInCacheArray) \ | 178 V(ForInCacheArray) \ |
179 V(CheckMapValue) \ | 179 V(CheckMapValue) \ |
180 V(LoadFieldByIndex) \ | 180 V(LoadFieldByIndex) \ |
181 V(DateField) \ | 181 V(DateField) \ |
182 V(WrapReceiver) | 182 V(WrapReceiver) \ |
| 183 V(Pop) |
183 | 184 |
184 | 185 |
185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 186 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
186 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 187 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
187 virtual void CompileToNative(LCodeGen* generator); \ | 188 virtual void CompileToNative(LCodeGen* generator); \ |
188 virtual const char* Mnemonic() const { return mnemonic; } \ | 189 virtual const char* Mnemonic() const { return mnemonic; } \ |
189 static L##type* cast(LInstruction* instr) { \ | 190 static L##type* cast(LInstruction* instr) { \ |
190 ASSERT(instr->Is##type()); \ | 191 ASSERT(instr->Is##type()); \ |
191 return reinterpret_cast<L##type*>(instr); \ | 192 return reinterpret_cast<L##type*>(instr); \ |
192 } | 193 } |
(...skipping 335 matching lines...) Loading... |
528 explicit LArgumentsLength(LOperand* elements) { | 529 explicit LArgumentsLength(LOperand* elements) { |
529 inputs_[0] = elements; | 530 inputs_[0] = elements; |
530 } | 531 } |
531 | 532 |
532 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 533 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
533 }; | 534 }; |
534 | 535 |
535 | 536 |
536 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 537 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
537 public: | 538 public: |
538 LArgumentsElements() { } | 539 explicit LArgumentsElements(bool from_inlined) |
| 540 : from_inlined_(from_inlined) { } |
| 541 |
| 542 bool from_inlined() const { return from_inlined_; } |
539 | 543 |
540 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 544 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
| 545 |
| 546 private: |
| 547 bool from_inlined_; |
541 }; | 548 }; |
542 | 549 |
543 | 550 |
544 class LModI: public LTemplateInstruction<1, 2, 1> { | 551 class LModI: public LTemplateInstruction<1, 2, 1> { |
545 public: | 552 public: |
546 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 553 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
547 inputs_[0] = left; | 554 inputs_[0] = left; |
548 inputs_[1] = right; | 555 inputs_[1] = right; |
549 temps_[0] = temp; | 556 temps_[0] = temp; |
550 } | 557 } |
(...skipping 800 matching lines...) Loading... |
1351 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 1358 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
1352 public: | 1359 public: |
1353 explicit LPushArgument(LOperand* value) { | 1360 explicit LPushArgument(LOperand* value) { |
1354 inputs_[0] = value; | 1361 inputs_[0] = value; |
1355 } | 1362 } |
1356 | 1363 |
1357 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1364 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
1358 }; | 1365 }; |
1359 | 1366 |
1360 | 1367 |
| 1368 class LPop: public LTemplateInstruction<0, 0, 0> { |
| 1369 public: |
| 1370 explicit LPop(int count) : count_(count) { } |
| 1371 |
| 1372 int count() const { return count_; } |
| 1373 |
| 1374 DECLARE_CONCRETE_INSTRUCTION(Pop, "pop") |
| 1375 |
| 1376 private: |
| 1377 int count_; |
| 1378 }; |
| 1379 |
| 1380 |
1361 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1381 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
1362 public: | 1382 public: |
1363 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1383 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
1364 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1384 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
1365 }; | 1385 }; |
1366 | 1386 |
1367 | 1387 |
1368 class LContext: public LTemplateInstruction<1, 0, 0> { | 1388 class LContext: public LTemplateInstruction<1, 0, 0> { |
1369 public: | 1389 public: |
1370 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1390 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
(...skipping 998 matching lines...) Loading... |
2369 | 2389 |
2370 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2390 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2371 }; | 2391 }; |
2372 | 2392 |
2373 #undef DECLARE_HYDROGEN_ACCESSOR | 2393 #undef DECLARE_HYDROGEN_ACCESSOR |
2374 #undef DECLARE_CONCRETE_INSTRUCTION | 2394 #undef DECLARE_CONCRETE_INSTRUCTION |
2375 | 2395 |
2376 } } // namespace v8::int | 2396 } } // namespace v8::int |
2377 | 2397 |
2378 #endif // V8_X64_LITHIUM_X64_H_ | 2398 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |