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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 V(TypeofIsAndBranch) \ | 181 V(TypeofIsAndBranch) \ |
182 V(UnaryMathOperation) \ | 182 V(UnaryMathOperation) \ |
183 V(UnknownOSRValue) \ | 183 V(UnknownOSRValue) \ |
184 V(ValueOf) \ | 184 V(ValueOf) \ |
185 V(ForInPrepareMap) \ | 185 V(ForInPrepareMap) \ |
186 V(ForInCacheArray) \ | 186 V(ForInCacheArray) \ |
187 V(CheckMapValue) \ | 187 V(CheckMapValue) \ |
188 V(LoadFieldByIndex) \ | 188 V(LoadFieldByIndex) \ |
189 V(DateField) \ | 189 V(DateField) \ |
190 V(WrapReceiver) \ | 190 V(WrapReceiver) \ |
191 V(Drop) | 191 V(Drop) \ |
| 192 V(SubAllocatedObject) |
192 | 193 |
193 | 194 |
194 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 195 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
195 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 196 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
196 virtual void CompileToNative(LCodeGen* generator); \ | 197 virtual void CompileToNative(LCodeGen* generator); \ |
197 virtual const char* Mnemonic() const { return mnemonic; } \ | 198 virtual const char* Mnemonic() const { return mnemonic; } \ |
198 static L##type* cast(LInstruction* instr) { \ | 199 static L##type* cast(LInstruction* instr) { \ |
199 ASSERT(instr->Is##type()); \ | 200 ASSERT(instr->Is##type()); \ |
200 return reinterpret_cast<L##type*>(instr); \ | 201 return reinterpret_cast<L##type*>(instr); \ |
201 } | 202 } |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 | 1588 |
1588 int count() const { return count_; } | 1589 int count() const { return count_; } |
1589 | 1590 |
1590 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") | 1591 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") |
1591 | 1592 |
1592 private: | 1593 private: |
1593 int count_; | 1594 int count_; |
1594 }; | 1595 }; |
1595 | 1596 |
1596 | 1597 |
| 1598 class LSubAllocatedObject: public LTemplateInstruction<1, 1, 0> { |
| 1599 public: |
| 1600 explicit LSubAllocatedObject(LOperand* base_object) { |
| 1601 inputs_[0] = base_object; |
| 1602 } |
| 1603 |
| 1604 LOperand* base_object() { return inputs_[0]; } |
| 1605 int offset() { return hydrogen()->offset(); } |
| 1606 |
| 1607 virtual void PrintDataTo(StringStream* stream); |
| 1608 |
| 1609 DECLARE_CONCRETE_INSTRUCTION(SubAllocatedObject, "sub-allocated-object") |
| 1610 DECLARE_HYDROGEN_ACCESSOR(SubAllocatedObject) |
| 1611 }; |
| 1612 |
| 1613 |
1597 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1614 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
1598 public: | 1615 public: |
1599 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1616 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
1600 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1617 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
1601 }; | 1618 }; |
1602 | 1619 |
1603 | 1620 |
1604 class LContext: public LTemplateInstruction<1, 0, 0> { | 1621 class LContext: public LTemplateInstruction<1, 0, 0> { |
1605 public: | 1622 public: |
1606 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1623 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 | 2647 |
2631 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2648 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2632 }; | 2649 }; |
2633 | 2650 |
2634 #undef DECLARE_HYDROGEN_ACCESSOR | 2651 #undef DECLARE_HYDROGEN_ACCESSOR |
2635 #undef DECLARE_CONCRETE_INSTRUCTION | 2652 #undef DECLARE_CONCRETE_INSTRUCTION |
2636 | 2653 |
2637 } } // namespace v8::int | 2654 } } // namespace v8::int |
2638 | 2655 |
2639 #endif // V8_X64_LITHIUM_X64_H_ | 2656 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |