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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 V(TypeofIsAndBranch) \ | 184 V(TypeofIsAndBranch) \ |
185 V(UnaryMathOperation) \ | 185 V(UnaryMathOperation) \ |
186 V(UnknownOSRValue) \ | 186 V(UnknownOSRValue) \ |
187 V(ValueOf) \ | 187 V(ValueOf) \ |
188 V(ForInPrepareMap) \ | 188 V(ForInPrepareMap) \ |
189 V(ForInCacheArray) \ | 189 V(ForInCacheArray) \ |
190 V(CheckMapValue) \ | 190 V(CheckMapValue) \ |
191 V(LoadFieldByIndex) \ | 191 V(LoadFieldByIndex) \ |
192 V(DateField) \ | 192 V(DateField) \ |
193 V(WrapReceiver) \ | 193 V(WrapReceiver) \ |
194 V(Drop) | 194 V(Drop) \ |
| 195 V(SubAllocatedObject) |
195 | 196 |
196 | 197 |
197 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 198 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
198 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 199 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
199 virtual void CompileToNative(LCodeGen* generator); \ | 200 virtual void CompileToNative(LCodeGen* generator); \ |
200 virtual const char* Mnemonic() const { return mnemonic; } \ | 201 virtual const char* Mnemonic() const { return mnemonic; } \ |
201 static L##type* cast(LInstruction* instr) { \ | 202 static L##type* cast(LInstruction* instr) { \ |
202 ASSERT(instr->Is##type()); \ | 203 ASSERT(instr->Is##type()); \ |
203 return reinterpret_cast<L##type*>(instr); \ | 204 return reinterpret_cast<L##type*>(instr); \ |
204 } | 205 } |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1648 | 1649 |
1649 int count() const { return count_; } | 1650 int count() const { return count_; } |
1650 | 1651 |
1651 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") | 1652 DECLARE_CONCRETE_INSTRUCTION(Drop, "drop") |
1652 | 1653 |
1653 private: | 1654 private: |
1654 int count_; | 1655 int count_; |
1655 }; | 1656 }; |
1656 | 1657 |
1657 | 1658 |
| 1659 class LSubAllocatedObject: public LTemplateInstruction<1, 1, 0> { |
| 1660 public: |
| 1661 explicit LSubAllocatedObject(LOperand* base_object) { |
| 1662 inputs_[0] = base_object; |
| 1663 } |
| 1664 |
| 1665 LOperand* base_object() { return inputs_[0]; } |
| 1666 int offset() { return hydrogen()->offset(); } |
| 1667 |
| 1668 virtual void PrintDataTo(StringStream* stream); |
| 1669 |
| 1670 DECLARE_CONCRETE_INSTRUCTION(SubAllocatedObject, "sub-allocated-object") |
| 1671 DECLARE_HYDROGEN_ACCESSOR(SubAllocatedObject) |
| 1672 }; |
| 1673 |
| 1674 |
1658 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 1675 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |
1659 public: | 1676 public: |
1660 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 1677 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
1661 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 1678 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
1662 }; | 1679 }; |
1663 | 1680 |
1664 | 1681 |
1665 class LContext: public LTemplateInstruction<1, 0, 0> { | 1682 class LContext: public LTemplateInstruction<1, 0, 0> { |
1666 public: | 1683 public: |
1667 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1684 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2732 | 2749 |
2733 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2750 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2734 }; | 2751 }; |
2735 | 2752 |
2736 #undef DECLARE_HYDROGEN_ACCESSOR | 2753 #undef DECLARE_HYDROGEN_ACCESSOR |
2737 #undef DECLARE_CONCRETE_INSTRUCTION | 2754 #undef DECLARE_CONCRETE_INSTRUCTION |
2738 | 2755 |
2739 } } // namespace v8::internal | 2756 } } // namespace v8::internal |
2740 | 2757 |
2741 #endif // V8_ARM_LITHIUM_ARM_H_ | 2758 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |