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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 V(ToFastProperties) \ | 170 V(ToFastProperties) \ |
171 V(TransitionElementsKind) \ | 171 V(TransitionElementsKind) \ |
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(WrapReceiver) |
181 | 182 |
182 | 183 |
183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
184 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 185 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
185 virtual void CompileToNative(LCodeGen* generator); \ | 186 virtual void CompileToNative(LCodeGen* generator); \ |
186 virtual const char* Mnemonic() const { return mnemonic; } \ | 187 virtual const char* Mnemonic() const { return mnemonic; } \ |
187 static L##type* cast(LInstruction* instr) { \ | 188 static L##type* cast(LInstruction* instr) { \ |
188 ASSERT(instr->Is##type()); \ | 189 ASSERT(instr->Is##type()); \ |
189 return reinterpret_cast<L##type*>(instr); \ | 190 return reinterpret_cast<L##type*>(instr); \ |
190 } | 191 } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); } | 462 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); } |
462 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); } | 463 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); } |
463 | 464 |
464 private: | 465 private: |
465 HControlInstruction* hydrogen() { | 466 HControlInstruction* hydrogen() { |
466 return HControlInstruction::cast(this->hydrogen_value()); | 467 return HControlInstruction::cast(this->hydrogen_value()); |
467 } | 468 } |
468 }; | 469 }; |
469 | 470 |
470 | 471 |
| 472 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { |
| 473 public: |
| 474 LWrapReceiver(LOperand* receiver, LOperand* function) { |
| 475 inputs_[0] = receiver; |
| 476 inputs_[1] = function; |
| 477 } |
| 478 |
| 479 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 480 |
| 481 LOperand* receiver() { return inputs_[0]; } |
| 482 LOperand* function() { return inputs_[1]; } |
| 483 }; |
| 484 |
| 485 |
471 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { | 486 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { |
472 public: | 487 public: |
473 LApplyArguments(LOperand* function, | 488 LApplyArguments(LOperand* function, |
474 LOperand* receiver, | 489 LOperand* receiver, |
475 LOperand* length, | 490 LOperand* length, |
476 LOperand* elements) { | 491 LOperand* elements) { |
477 inputs_[0] = function; | 492 inputs_[0] = function; |
478 inputs_[1] = receiver; | 493 inputs_[1] = receiver; |
479 inputs_[2] = length; | 494 inputs_[2] = length; |
480 inputs_[3] = elements; | 495 inputs_[3] = elements; |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2337 | 2352 |
2338 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2353 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2339 }; | 2354 }; |
2340 | 2355 |
2341 #undef DECLARE_HYDROGEN_ACCESSOR | 2356 #undef DECLARE_HYDROGEN_ACCESSOR |
2342 #undef DECLARE_CONCRETE_INSTRUCTION | 2357 #undef DECLARE_CONCRETE_INSTRUCTION |
2343 | 2358 |
2344 } } // namespace v8::int | 2359 } } // namespace v8::int |
2345 | 2360 |
2346 #endif // V8_X64_LITHIUM_X64_H_ | 2361 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |