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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(DateField) | 181 V(DateField) \ |
| 182 V(WrapReceiver) |
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 } |
191 | 192 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); } | 461 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); } |
461 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); } | 462 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); } |
462 | 463 |
463 private: | 464 private: |
464 HControlInstruction* hydrogen() { | 465 HControlInstruction* hydrogen() { |
465 return HControlInstruction::cast(this->hydrogen_value()); | 466 return HControlInstruction::cast(this->hydrogen_value()); |
466 } | 467 } |
467 }; | 468 }; |
468 | 469 |
469 | 470 |
| 471 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { |
| 472 public: |
| 473 LWrapReceiver(LOperand* receiver, LOperand* function) { |
| 474 inputs_[0] = receiver; |
| 475 inputs_[1] = function; |
| 476 } |
| 477 |
| 478 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 479 |
| 480 LOperand* receiver() { return inputs_[0]; } |
| 481 LOperand* function() { return inputs_[1]; } |
| 482 }; |
| 483 |
| 484 |
470 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { | 485 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { |
471 public: | 486 public: |
472 LApplyArguments(LOperand* function, | 487 LApplyArguments(LOperand* function, |
473 LOperand* receiver, | 488 LOperand* receiver, |
474 LOperand* length, | 489 LOperand* length, |
475 LOperand* elements) { | 490 LOperand* elements) { |
476 inputs_[0] = function; | 491 inputs_[0] = function; |
477 inputs_[1] = receiver; | 492 inputs_[1] = receiver; |
478 inputs_[2] = length; | 493 inputs_[2] = length; |
479 inputs_[3] = elements; | 494 inputs_[3] = elements; |
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2369 | 2384 |
2370 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2385 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2371 }; | 2386 }; |
2372 | 2387 |
2373 #undef DECLARE_HYDROGEN_ACCESSOR | 2388 #undef DECLARE_HYDROGEN_ACCESSOR |
2374 #undef DECLARE_CONCRETE_INSTRUCTION | 2389 #undef DECLARE_CONCRETE_INSTRUCTION |
2375 | 2390 |
2376 } } // namespace v8::internal | 2391 } } // namespace v8::internal |
2377 | 2392 |
2378 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2393 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |