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...) Expand 10 before | Expand all | Expand 10 after 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
527 explicit LArgumentsLength(LOperand* elements) { | 528 explicit LArgumentsLength(LOperand* elements) { |
528 inputs_[0] = elements; | 529 inputs_[0] = elements; |
529 } | 530 } |
530 | 531 |
531 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 532 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
532 }; | 533 }; |
533 | 534 |
534 | 535 |
535 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 536 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
536 public: | 537 public: |
537 LArgumentsElements() { } | 538 explicit LArgumentsElements(bool from_inlined) |
539 : from_inlined_(from_inlined) { } | |
540 | |
541 bool from_inlined() const { return from_inlined_; } | |
538 | 542 |
539 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") | 543 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") |
544 | |
545 private: | |
546 bool from_inlined_; | |
540 }; | 547 }; |
541 | 548 |
542 | 549 |
543 class LModI: public LTemplateInstruction<1, 2, 3> { | 550 class LModI: public LTemplateInstruction<1, 2, 3> { |
544 public: | 551 public: |
545 // Used when the right hand is a constant power of 2. | 552 // Used when the right hand is a constant power of 2. |
546 LModI(LOperand* left, | 553 LModI(LOperand* left, |
547 LOperand* right) { | 554 LOperand* right) { |
548 inputs_[0] = left; | 555 inputs_[0] = left; |
549 inputs_[1] = right; | 556 inputs_[1] = right; |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1371 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 1378 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
1372 public: | 1379 public: |
1373 explicit LPushArgument(LOperand* value) { | 1380 explicit LPushArgument(LOperand* value) { |
1374 inputs_[0] = value; | 1381 inputs_[0] = value; |
1375 } | 1382 } |
1376 | 1383 |
1377 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1384 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
1378 }; | 1385 }; |
1379 | 1386 |
1380 | 1387 |
1388 class LPop: public LTemplateInstruction<0, 0, 0> { | |
Kevin Millikin (Chromium)
2012/04/11 11:49:18
I think we normally use the terminology "Drop" for
Vyacheslav Egorov (Chromium)
2012/04/11 12:47:28
Done.
| |
1389 public: | |
1390 explicit LPop(int count) : count_(count) { } | |
1391 | |
1392 int count() const { return count_; } | |
1393 | |
1394 DECLARE_CONCRETE_INSTRUCTION(Pop, "pop") | |
1395 | |
1396 private: | |
1397 int count_; | |
1398 }; | |
1399 | |
1400 | |
1381 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1401 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
1382 public: | 1402 public: |
1383 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1403 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
1384 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1404 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
1385 }; | 1405 }; |
1386 | 1406 |
1387 | 1407 |
1388 class LContext: public LTemplateInstruction<1, 0, 0> { | 1408 class LContext: public LTemplateInstruction<1, 0, 0> { |
1389 public: | 1409 public: |
1390 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1410 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2403 | 2423 |
2404 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2424 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2405 }; | 2425 }; |
2406 | 2426 |
2407 #undef DECLARE_HYDROGEN_ACCESSOR | 2427 #undef DECLARE_HYDROGEN_ACCESSOR |
2408 #undef DECLARE_CONCRETE_INSTRUCTION | 2428 #undef DECLARE_CONCRETE_INSTRUCTION |
2409 | 2429 |
2410 } } // namespace v8::internal | 2430 } } // namespace v8::internal |
2411 | 2431 |
2412 #endif // V8_ARM_LITHIUM_ARM_H_ | 2432 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |