| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 V(Typeof) \ | 167 V(Typeof) \ |
| 168 V(TypeofIsAndBranch) \ | 168 V(TypeofIsAndBranch) \ |
| 169 V(UnaryMathOperation) \ | 169 V(UnaryMathOperation) \ |
| 170 V(UnknownOSRValue) \ | 170 V(UnknownOSRValue) \ |
| 171 V(ValueOf) \ | 171 V(ValueOf) \ |
| 172 V(ForInPrepareMap) \ | 172 V(ForInPrepareMap) \ |
| 173 V(ForInCacheArray) \ | 173 V(ForInCacheArray) \ |
| 174 V(CheckMapValue) \ | 174 V(CheckMapValue) \ |
| 175 V(LoadFieldByIndex) \ | 175 V(LoadFieldByIndex) \ |
| 176 V(DateField) \ | 176 V(DateField) \ |
| 177 V(WrapReceiver) | 177 V(WrapReceiver) \ |
| 178 V(Pop) |
| 178 | 179 |
| 179 | 180 |
| 180 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 181 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 181 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 182 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
| 182 virtual void CompileToNative(LCodeGen* generator); \ | 183 virtual void CompileToNative(LCodeGen* generator); \ |
| 183 virtual const char* Mnemonic() const { return mnemonic; } \ | 184 virtual const char* Mnemonic() const { return mnemonic; } \ |
| 184 static L##type* cast(LInstruction* instr) { \ | 185 static L##type* cast(LInstruction* instr) { \ |
| 185 ASSERT(instr->Is##type()); \ | 186 ASSERT(instr->Is##type()); \ |
| 186 return reinterpret_cast<L##type*>(instr); \ | 187 return reinterpret_cast<L##type*>(instr); \ |
| 187 } | 188 } |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 explicit LArgumentsLength(LOperand* elements) { | 519 explicit LArgumentsLength(LOperand* elements) { |
| 519 inputs_[0] = elements; | 520 inputs_[0] = elements; |
| 520 } | 521 } |
| 521 | 522 |
| 522 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 523 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
| 523 }; | 524 }; |
| 524 | 525 |
| 525 | 526 |
| 526 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 527 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
| 527 public: | 528 public: |
| 528 LArgumentsElements() { } | 529 explicit LArgumentsElements(bool from_inlined) |
| 530 : from_inlined_(from_inlined) { } |
| 531 |
| 532 bool from_inlined() const { return from_inlined_; } |
| 529 | 533 |
| 530 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 534 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
| 535 |
| 536 private: |
| 537 bool from_inlined_; |
| 531 }; | 538 }; |
| 532 | 539 |
| 533 | 540 |
| 534 class LModI: public LTemplateInstruction<1, 2, 1> { | 541 class LModI: public LTemplateInstruction<1, 2, 1> { |
| 535 public: | 542 public: |
| 536 LModI(LOperand* left, LOperand* right, LOperand* temp) { | 543 LModI(LOperand* left, LOperand* right, LOperand* temp) { |
| 537 inputs_[0] = left; | 544 inputs_[0] = left; |
| 538 inputs_[1] = right; | 545 inputs_[1] = right; |
| 539 temps_[0] = temp; | 546 temps_[0] = temp; |
| 540 } | 547 } |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 1401 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
| 1395 public: | 1402 public: |
| 1396 explicit LPushArgument(LOperand* value) { | 1403 explicit LPushArgument(LOperand* value) { |
| 1397 inputs_[0] = value; | 1404 inputs_[0] = value; |
| 1398 } | 1405 } |
| 1399 | 1406 |
| 1400 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1407 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
| 1401 }; | 1408 }; |
| 1402 | 1409 |
| 1403 | 1410 |
| 1411 class LPop: public LTemplateInstruction<0, 0, 0> { |
| 1412 public: |
| 1413 explicit LPop(int count) : count_(count) { } |
| 1414 |
| 1415 int count() const { return count_; } |
| 1416 |
| 1417 DECLARE_CONCRETE_INSTRUCTION(Pop, "pop") |
| 1418 |
| 1419 private: |
| 1420 int count_; |
| 1421 }; |
| 1422 |
| 1423 |
| 1404 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1424 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
| 1405 public: | 1425 public: |
| 1406 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1426 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
| 1407 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1427 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
| 1408 }; | 1428 }; |
| 1409 | 1429 |
| 1410 | 1430 |
| 1411 class LContext: public LTemplateInstruction<1, 0, 0> { | 1431 class LContext: public LTemplateInstruction<1, 0, 0> { |
| 1412 public: | 1432 public: |
| 1413 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1433 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 | 2525 |
| 2506 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2526 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2507 }; | 2527 }; |
| 2508 | 2528 |
| 2509 #undef DECLARE_HYDROGEN_ACCESSOR | 2529 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2510 #undef DECLARE_CONCRETE_INSTRUCTION | 2530 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2511 | 2531 |
| 2512 } } // namespace v8::internal | 2532 } } // namespace v8::internal |
| 2513 | 2533 |
| 2514 #endif // V8_IA32_LITHIUM_IA32_H_ | 2534 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |