OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 V(Context) \ | 86 V(Context) \ |
87 V(DateField) \ | 87 V(DateField) \ |
88 V(DebugBreak) \ | 88 V(DebugBreak) \ |
89 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
90 V(Deoptimize) \ | 90 V(Deoptimize) \ |
91 V(DivI) \ | 91 V(DivI) \ |
92 V(DoubleToIntOrSmi) \ | 92 V(DoubleToIntOrSmi) \ |
93 V(Drop) \ | 93 V(Drop) \ |
94 V(Dummy) \ | 94 V(Dummy) \ |
95 V(DummyUse) \ | 95 V(DummyUse) \ |
96 V(ElementsKind) \ | |
97 V(ForInCacheArray) \ | 96 V(ForInCacheArray) \ |
98 V(ForInPrepareMap) \ | 97 V(ForInPrepareMap) \ |
99 V(FunctionLiteral) \ | 98 V(FunctionLiteral) \ |
100 V(GetCachedArrayIndex) \ | 99 V(GetCachedArrayIndex) \ |
101 V(Goto) \ | 100 V(Goto) \ |
102 V(HasCachedArrayIndexAndBranch) \ | 101 V(HasCachedArrayIndexAndBranch) \ |
103 V(HasInstanceTypeAndBranch) \ | 102 V(HasInstanceTypeAndBranch) \ |
104 V(InnerAllocatedObject) \ | 103 V(InnerAllocatedObject) \ |
105 V(InstanceOf) \ | 104 V(InstanceOf) \ |
106 V(InstanceOfKnownGlobal) \ | 105 V(InstanceOfKnownGlobal) \ |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 V(StoreNamedField) \ | 167 V(StoreNamedField) \ |
169 V(StoreNamedGeneric) \ | 168 V(StoreNamedGeneric) \ |
170 V(StringAdd) \ | 169 V(StringAdd) \ |
171 V(StringCharCodeAt) \ | 170 V(StringCharCodeAt) \ |
172 V(StringCharFromCode) \ | 171 V(StringCharFromCode) \ |
173 V(StringCompareAndBranch) \ | 172 V(StringCompareAndBranch) \ |
174 V(SubI) \ | 173 V(SubI) \ |
175 V(SubS) \ | 174 V(SubS) \ |
176 V(TaggedToI) \ | 175 V(TaggedToI) \ |
177 V(ThisFunction) \ | 176 V(ThisFunction) \ |
178 V(Throw) \ | |
179 V(ToFastProperties) \ | 177 V(ToFastProperties) \ |
180 V(TransitionElementsKind) \ | 178 V(TransitionElementsKind) \ |
181 V(TrapAllocationMemento) \ | 179 V(TrapAllocationMemento) \ |
182 V(TruncateDoubleToIntOrSmi) \ | 180 V(TruncateDoubleToIntOrSmi) \ |
183 V(Typeof) \ | 181 V(Typeof) \ |
184 V(TypeofIsAndBranch) \ | 182 V(TypeofIsAndBranch) \ |
185 V(Uint32ToDouble) \ | 183 V(Uint32ToDouble) \ |
186 V(Uint32ToSmi) \ | 184 V(Uint32ToSmi) \ |
187 V(UnknownOSRValue) \ | 185 V(UnknownOSRValue) \ |
188 V(ValueOf) \ | |
189 V(WrapReceiver) | 186 V(WrapReceiver) |
190 | 187 |
191 | 188 |
192 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 189 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
193 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 190 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
194 return LInstruction::k##type; \ | 191 return LInstruction::k##type; \ |
195 } \ | 192 } \ |
196 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 193 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
197 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 194 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
198 return mnemonic; \ | 195 return mnemonic; \ |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 | 1259 |
1263 LOperand* value() { return inputs_[0]; } | 1260 LOperand* value() { return inputs_[0]; } |
1264 | 1261 |
1265 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi") | 1262 DECLARE_CONCRETE_INSTRUCTION(DoubleToIntOrSmi, "double-to-int-or-smi") |
1266 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 1263 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
1267 | 1264 |
1268 bool tag_result() { return hydrogen()->representation().IsSmi(); } | 1265 bool tag_result() { return hydrogen()->representation().IsSmi(); } |
1269 }; | 1266 }; |
1270 | 1267 |
1271 | 1268 |
1272 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
1273 public: | |
1274 explicit LElementsKind(LOperand* value) { | |
1275 inputs_[0] = value; | |
1276 } | |
1277 | |
1278 LOperand* value() { return inputs_[0]; } | |
1279 | |
1280 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | |
1281 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | |
1282 }; | |
1283 | |
1284 | |
1285 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1269 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1286 public: | 1270 public: |
1287 explicit LForInCacheArray(LOperand* map) { | 1271 explicit LForInCacheArray(LOperand* map) { |
1288 inputs_[0] = map; | 1272 inputs_[0] = map; |
1289 } | 1273 } |
1290 | 1274 |
1291 LOperand* map() { return inputs_[0]; } | 1275 LOperand* map() { return inputs_[0]; } |
1292 | 1276 |
1293 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") | 1277 DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array") |
1294 | 1278 |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 }; | 2595 }; |
2612 | 2596 |
2613 | 2597 |
2614 class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2598 class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
2615 public: | 2599 public: |
2616 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 2600 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |
2617 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 2601 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) |
2618 }; | 2602 }; |
2619 | 2603 |
2620 | 2604 |
2621 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { | |
2622 public: | |
2623 LThrow(LOperand* context, LOperand* value) { | |
2624 inputs_[0] = context; | |
2625 inputs_[1] = value; | |
2626 } | |
2627 | |
2628 LOperand* context() { return inputs_[0]; } | |
2629 LOperand* value() { return inputs_[1]; } | |
2630 | |
2631 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | |
2632 }; | |
2633 | |
2634 | |
2635 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2605 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2636 public: | 2606 public: |
2637 explicit LToFastProperties(LOperand* value) { | 2607 explicit LToFastProperties(LOperand* value) { |
2638 inputs_[0] = value; | 2608 inputs_[0] = value; |
2639 } | 2609 } |
2640 | 2610 |
2641 LOperand* value() { return inputs_[0]; } | 2611 LOperand* value() { return inputs_[0]; } |
2642 | 2612 |
2643 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2613 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
2644 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2614 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 inputs_[0] = value; | 2737 inputs_[0] = value; |
2768 } | 2738 } |
2769 | 2739 |
2770 LOperand* value() { return inputs_[0]; } | 2740 LOperand* value() { return inputs_[0]; } |
2771 | 2741 |
2772 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") | 2742 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") |
2773 DECLARE_HYDROGEN_ACCESSOR(Change) | 2743 DECLARE_HYDROGEN_ACCESSOR(Change) |
2774 }; | 2744 }; |
2775 | 2745 |
2776 | 2746 |
2777 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { | |
2778 public: | |
2779 LValueOf(LOperand* value, LOperand* temp) { | |
2780 inputs_[0] = value; | |
2781 temps_[0] = temp; | |
2782 } | |
2783 | |
2784 LOperand* value() { return inputs_[0]; } | |
2785 LOperand* temp() { return temps_[0]; } | |
2786 | |
2787 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | |
2788 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
2789 }; | |
2790 | |
2791 | |
2792 class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 1> { | 2747 class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 1> { |
2793 public: | 2748 public: |
2794 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) { | 2749 LCheckMapValue(LOperand* value, LOperand* map, LOperand* temp) { |
2795 inputs_[0] = value; | 2750 inputs_[0] = value; |
2796 inputs_[1] = map; | 2751 inputs_[1] = map; |
2797 temps_[0] = temp; | 2752 temps_[0] = temp; |
2798 } | 2753 } |
2799 | 2754 |
2800 LOperand* value() { return inputs_[0]; } | 2755 LOperand* value() { return inputs_[0]; } |
2801 LOperand* map() { return inputs_[1]; } | 2756 LOperand* map() { return inputs_[1]; } |
(...skipping 18 matching lines...) Expand all Loading... |
2820 | 2775 |
2821 | 2776 |
2822 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2777 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2823 public: | 2778 public: |
2824 LWrapReceiver(LOperand* receiver, LOperand* function) { | 2779 LWrapReceiver(LOperand* receiver, LOperand* function) { |
2825 inputs_[0] = receiver; | 2780 inputs_[0] = receiver; |
2826 inputs_[1] = function; | 2781 inputs_[1] = function; |
2827 } | 2782 } |
2828 | 2783 |
2829 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 2784 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 2785 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
2830 | 2786 |
2831 LOperand* receiver() { return inputs_[0]; } | 2787 LOperand* receiver() { return inputs_[0]; } |
2832 LOperand* function() { return inputs_[1]; } | 2788 LOperand* function() { return inputs_[1]; } |
2833 }; | 2789 }; |
2834 | 2790 |
2835 | 2791 |
2836 class LChunkBuilder; | 2792 class LChunkBuilder; |
2837 class LPlatformChunk V8_FINAL : public LChunk { | 2793 class LPlatformChunk V8_FINAL : public LChunk { |
2838 public: | 2794 public: |
2839 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2795 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 | 2946 |
2991 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2947 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2992 }; | 2948 }; |
2993 | 2949 |
2994 #undef DECLARE_HYDROGEN_ACCESSOR | 2950 #undef DECLARE_HYDROGEN_ACCESSOR |
2995 #undef DECLARE_CONCRETE_INSTRUCTION | 2951 #undef DECLARE_CONCRETE_INSTRUCTION |
2996 | 2952 |
2997 } } // namespace v8::internal | 2953 } } // namespace v8::internal |
2998 | 2954 |
2999 #endif // V8_A64_LITHIUM_A64_H_ | 2955 #endif // V8_A64_LITHIUM_A64_H_ |
OLD | NEW |