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 | 184 |
184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
185 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 186 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
186 virtual void CompileToNative(LCodeGen* generator); \ | 187 virtual void CompileToNative(LCodeGen* generator); \ |
187 virtual const char* Mnemonic() const { return mnemonic; } \ | 188 virtual const char* Mnemonic() const { return mnemonic; } \ |
188 static L##type* cast(LInstruction* instr) { \ | 189 static L##type* cast(LInstruction* instr) { \ |
189 ASSERT(instr->Is##type()); \ | 190 ASSERT(instr->Is##type()); \ |
190 return reinterpret_cast<L##type*>(instr); \ | 191 return reinterpret_cast<L##type*>(instr); \ |
(...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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2353 | 2368 |
2354 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2369 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2355 }; | 2370 }; |
2356 | 2371 |
2357 #undef DECLARE_HYDROGEN_ACCESSOR | 2372 #undef DECLARE_HYDROGEN_ACCESSOR |
2358 #undef DECLARE_CONCRETE_INSTRUCTION | 2373 #undef DECLARE_CONCRETE_INSTRUCTION |
2359 | 2374 |
2360 } } // namespace v8::internal | 2375 } } // namespace v8::internal |
2361 | 2376 |
2362 #endif // V8_ARM_LITHIUM_ARM_H_ | 2377 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |