OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_IA32_LITHIUM_IA32_H_ | 5 #ifndef V8_IA32_LITHIUM_IA32_H_ |
6 #define V8_IA32_LITHIUM_IA32_H_ | 6 #define V8_IA32_LITHIUM_IA32_H_ |
7 | 7 |
8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
9 #include "lithium-allocator.h" | 9 #include "lithium-allocator.h" |
10 #include "lithium.h" | 10 #include "lithium.h" |
11 #include "safepoint-table.h" | 11 #include "safepoint-table.h" |
12 #include "utils.h" | 12 #include "utils.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 // Forward declarations. | 17 // Forward declarations. |
18 class LCodeGen; | 18 class LCodeGen; |
19 | 19 |
20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ | 20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ |
21 V(AccessArgumentsAt) \ | 21 V(AccessArgumentsAt) \ |
22 V(AddI) \ | 22 V(AddI) \ |
| 23 V(AllocateBlockContext) \ |
23 V(Allocate) \ | 24 V(Allocate) \ |
24 V(ApplyArguments) \ | 25 V(ApplyArguments) \ |
25 V(ArgumentsElements) \ | 26 V(ArgumentsElements) \ |
26 V(ArgumentsLength) \ | 27 V(ArgumentsLength) \ |
27 V(ArithmeticD) \ | 28 V(ArithmeticD) \ |
28 V(ArithmeticT) \ | 29 V(ArithmeticT) \ |
29 V(ArrayShift) \ | 30 V(ArrayShift) \ |
30 V(BitI) \ | 31 V(BitI) \ |
31 V(BoundsCheck) \ | 32 V(BoundsCheck) \ |
32 V(Branch) \ | 33 V(Branch) \ |
(...skipping 98 matching lines...) Loading... |
131 V(RegExpLiteral) \ | 132 V(RegExpLiteral) \ |
132 V(Return) \ | 133 V(Return) \ |
133 V(SeqStringGetChar) \ | 134 V(SeqStringGetChar) \ |
134 V(SeqStringSetChar) \ | 135 V(SeqStringSetChar) \ |
135 V(ShiftI) \ | 136 V(ShiftI) \ |
136 V(SmiTag) \ | 137 V(SmiTag) \ |
137 V(SmiUntag) \ | 138 V(SmiUntag) \ |
138 V(StackCheck) \ | 139 V(StackCheck) \ |
139 V(StoreCodeEntry) \ | 140 V(StoreCodeEntry) \ |
140 V(StoreContextSlot) \ | 141 V(StoreContextSlot) \ |
| 142 V(StoreFrameContext) \ |
141 V(StoreGlobalCell) \ | 143 V(StoreGlobalCell) \ |
142 V(StoreKeyed) \ | 144 V(StoreKeyed) \ |
143 V(StoreKeyedGeneric) \ | 145 V(StoreKeyedGeneric) \ |
144 V(StoreNamedField) \ | 146 V(StoreNamedField) \ |
145 V(StoreNamedGeneric) \ | 147 V(StoreNamedGeneric) \ |
146 V(StringAdd) \ | 148 V(StringAdd) \ |
147 V(StringCharCodeAt) \ | 149 V(StringCharCodeAt) \ |
148 V(StringCharFromCode) \ | 150 V(StringCharFromCode) \ |
149 V(StringCompareAndBranch) \ | 151 V(StringCompareAndBranch) \ |
150 V(SubI) \ | 152 V(SubI) \ |
(...skipping 2506 matching lines...) Loading... |
2657 inputs_[1] = index; | 2659 inputs_[1] = index; |
2658 } | 2660 } |
2659 | 2661 |
2660 LOperand* object() { return inputs_[0]; } | 2662 LOperand* object() { return inputs_[0]; } |
2661 LOperand* index() { return inputs_[1]; } | 2663 LOperand* index() { return inputs_[1]; } |
2662 | 2664 |
2663 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") | 2665 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") |
2664 }; | 2666 }; |
2665 | 2667 |
2666 | 2668 |
| 2669 class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> { |
| 2670 public: |
| 2671 explicit LStoreFrameContext(LOperand* context) { |
| 2672 inputs_[0] = context; |
| 2673 } |
| 2674 |
| 2675 LOperand* context() { return inputs_[0]; } |
| 2676 |
| 2677 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") |
| 2678 }; |
| 2679 |
| 2680 |
| 2681 class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> { |
| 2682 public: |
| 2683 LAllocateBlockContext(LOperand* context, LOperand* function) { |
| 2684 inputs_[0] = context; |
| 2685 inputs_[1] = function; |
| 2686 } |
| 2687 |
| 2688 LOperand* context() { return inputs_[0]; } |
| 2689 LOperand* function() { return inputs_[1]; } |
| 2690 |
| 2691 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } |
| 2692 |
| 2693 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") |
| 2694 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) |
| 2695 }; |
| 2696 |
| 2697 |
2667 class LChunkBuilder; | 2698 class LChunkBuilder; |
2668 class LPlatformChunk V8_FINAL : public LChunk { | 2699 class LPlatformChunk V8_FINAL : public LChunk { |
2669 public: | 2700 public: |
2670 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2701 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
2671 : LChunk(info, graph), | 2702 : LChunk(info, graph), |
2672 num_double_slots_(0) { } | 2703 num_double_slots_(0) { } |
2673 | 2704 |
2674 int GetNextSpillIndex(RegisterKind kind); | 2705 int GetNextSpillIndex(RegisterKind kind); |
2675 LOperand* GetNextSpillSlot(RegisterKind kind); | 2706 LOperand* GetNextSpillSlot(RegisterKind kind); |
2676 | 2707 |
(...skipping 172 matching lines...) Loading... |
2849 | 2880 |
2850 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2881 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2851 }; | 2882 }; |
2852 | 2883 |
2853 #undef DECLARE_HYDROGEN_ACCESSOR | 2884 #undef DECLARE_HYDROGEN_ACCESSOR |
2854 #undef DECLARE_CONCRETE_INSTRUCTION | 2885 #undef DECLARE_CONCRETE_INSTRUCTION |
2855 | 2886 |
2856 } } // namespace v8::internal | 2887 } } // namespace v8::internal |
2857 | 2888 |
2858 #endif // V8_IA32_LITHIUM_IA32_H_ | 2889 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |