| 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 "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium-allocator.h" | 9 #include "src/lithium-allocator.h" |
| 10 #include "src/lithium.h" | 10 #include "src/lithium.h" |
| 11 #include "src/safepoint-table.h" | 11 #include "src/safepoint-table.h" |
| 12 #include "src/utils.h" | 12 #include "src/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(BitI) \ | 30 V(BitI) \ |
| 30 V(BoundsCheck) \ | 31 V(BoundsCheck) \ |
| 31 V(Branch) \ | 32 V(Branch) \ |
| 32 V(CallJSFunction) \ | 33 V(CallJSFunction) \ |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 V(RegExpLiteral) \ | 131 V(RegExpLiteral) \ |
| 131 V(Return) \ | 132 V(Return) \ |
| 132 V(SeqStringGetChar) \ | 133 V(SeqStringGetChar) \ |
| 133 V(SeqStringSetChar) \ | 134 V(SeqStringSetChar) \ |
| 134 V(ShiftI) \ | 135 V(ShiftI) \ |
| 135 V(SmiTag) \ | 136 V(SmiTag) \ |
| 136 V(SmiUntag) \ | 137 V(SmiUntag) \ |
| 137 V(StackCheck) \ | 138 V(StackCheck) \ |
| 138 V(StoreCodeEntry) \ | 139 V(StoreCodeEntry) \ |
| 139 V(StoreContextSlot) \ | 140 V(StoreContextSlot) \ |
| 141 V(StoreFrameContext) \ |
| 140 V(StoreGlobalCell) \ | 142 V(StoreGlobalCell) \ |
| 141 V(StoreKeyed) \ | 143 V(StoreKeyed) \ |
| 142 V(StoreKeyedGeneric) \ | 144 V(StoreKeyedGeneric) \ |
| 143 V(StoreNamedField) \ | 145 V(StoreNamedField) \ |
| 144 V(StoreNamedGeneric) \ | 146 V(StoreNamedGeneric) \ |
| 145 V(StringAdd) \ | 147 V(StringAdd) \ |
| 146 V(StringCharCodeAt) \ | 148 V(StringCharCodeAt) \ |
| 147 V(StringCharFromCode) \ | 149 V(StringCharFromCode) \ |
| 148 V(StringCompareAndBranch) \ | 150 V(StringCompareAndBranch) \ |
| 149 V(SubI) \ | 151 V(SubI) \ |
| (...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2642 inputs_[1] = index; | 2644 inputs_[1] = index; |
| 2643 } | 2645 } |
| 2644 | 2646 |
| 2645 LOperand* object() { return inputs_[0]; } | 2647 LOperand* object() { return inputs_[0]; } |
| 2646 LOperand* index() { return inputs_[1]; } | 2648 LOperand* index() { return inputs_[1]; } |
| 2647 | 2649 |
| 2648 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") | 2650 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") |
| 2649 }; | 2651 }; |
| 2650 | 2652 |
| 2651 | 2653 |
| 2654 class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> { |
| 2655 public: |
| 2656 explicit LStoreFrameContext(LOperand* context) { |
| 2657 inputs_[0] = context; |
| 2658 } |
| 2659 |
| 2660 LOperand* context() { return inputs_[0]; } |
| 2661 |
| 2662 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") |
| 2663 }; |
| 2664 |
| 2665 |
| 2666 class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> { |
| 2667 public: |
| 2668 LAllocateBlockContext(LOperand* context, LOperand* function) { |
| 2669 inputs_[0] = context; |
| 2670 inputs_[1] = function; |
| 2671 } |
| 2672 |
| 2673 LOperand* context() { return inputs_[0]; } |
| 2674 LOperand* function() { return inputs_[1]; } |
| 2675 |
| 2676 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } |
| 2677 |
| 2678 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") |
| 2679 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) |
| 2680 }; |
| 2681 |
| 2682 |
| 2652 class LChunkBuilder; | 2683 class LChunkBuilder; |
| 2653 class LPlatformChunk V8_FINAL : public LChunk { | 2684 class LPlatformChunk V8_FINAL : public LChunk { |
| 2654 public: | 2685 public: |
| 2655 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2686 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
| 2656 : LChunk(info, graph), | 2687 : LChunk(info, graph), |
| 2657 num_double_slots_(0) { } | 2688 num_double_slots_(0) { } |
| 2658 | 2689 |
| 2659 int GetNextSpillIndex(RegisterKind kind); | 2690 int GetNextSpillIndex(RegisterKind kind); |
| 2660 LOperand* GetNextSpillSlot(RegisterKind kind); | 2691 LOperand* GetNextSpillSlot(RegisterKind kind); |
| 2661 | 2692 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 | 2863 |
| 2833 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2864 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2834 }; | 2865 }; |
| 2835 | 2866 |
| 2836 #undef DECLARE_HYDROGEN_ACCESSOR | 2867 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2837 #undef DECLARE_CONCRETE_INSTRUCTION | 2868 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2838 | 2869 |
| 2839 } } // namespace v8::internal | 2870 } } // namespace v8::internal |
| 2840 | 2871 |
| 2841 #endif // V8_IA32_LITHIUM_IA32_H_ | 2872 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |