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_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ |
7 | 7 |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.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(Allocate) \ | 23 V(Allocate) \ |
24 V(AllocateBlockContext) \ | |
25 V(ApplyArguments) \ | 24 V(ApplyArguments) \ |
26 V(ArgumentsElements) \ | 25 V(ArgumentsElements) \ |
27 V(ArgumentsLength) \ | 26 V(ArgumentsLength) \ |
28 V(ArithmeticD) \ | 27 V(ArithmeticD) \ |
29 V(ArithmeticT) \ | 28 V(ArithmeticT) \ |
30 V(BitI) \ | 29 V(BitI) \ |
31 V(BoundsCheck) \ | 30 V(BoundsCheck) \ |
32 V(Branch) \ | 31 V(Branch) \ |
33 V(CallJSFunction) \ | 32 V(CallJSFunction) \ |
34 V(CallWithDescriptor) \ | 33 V(CallWithDescriptor) \ |
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 explicit LStoreFrameContext(LOperand* context) { | 2519 explicit LStoreFrameContext(LOperand* context) { |
2521 inputs_[0] = context; | 2520 inputs_[0] = context; |
2522 } | 2521 } |
2523 | 2522 |
2524 LOperand* context() { return inputs_[0]; } | 2523 LOperand* context() { return inputs_[0]; } |
2525 | 2524 |
2526 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") | 2525 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") |
2527 }; | 2526 }; |
2528 | 2527 |
2529 | 2528 |
2530 class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> { | |
2531 public: | |
2532 LAllocateBlockContext(LOperand* context, LOperand* function) { | |
2533 inputs_[0] = context; | |
2534 inputs_[1] = function; | |
2535 } | |
2536 | |
2537 LOperand* context() { return inputs_[0]; } | |
2538 LOperand* function() { return inputs_[1]; } | |
2539 | |
2540 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } | |
2541 | |
2542 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") | |
2543 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) | |
2544 }; | |
2545 | |
2546 | |
2547 class LChunkBuilder; | 2529 class LChunkBuilder; |
2548 class LPlatformChunk final : public LChunk { | 2530 class LPlatformChunk final : public LChunk { |
2549 public: | 2531 public: |
2550 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2532 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
2551 : LChunk(info, graph) { } | 2533 : LChunk(info, graph) { } |
2552 | 2534 |
2553 int GetNextSpillIndex(RegisterKind kind); | 2535 int GetNextSpillIndex(RegisterKind kind); |
2554 LOperand* GetNextSpillSlot(RegisterKind kind); | 2536 LOperand* GetNextSpillSlot(RegisterKind kind); |
2555 }; | 2537 }; |
2556 | 2538 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2671 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2690 }; | 2672 }; |
2691 | 2673 |
2692 #undef DECLARE_HYDROGEN_ACCESSOR | 2674 #undef DECLARE_HYDROGEN_ACCESSOR |
2693 #undef DECLARE_CONCRETE_INSTRUCTION | 2675 #undef DECLARE_CONCRETE_INSTRUCTION |
2694 | 2676 |
2695 } // namespace internal | 2677 } // namespace internal |
2696 } // namespace v8 | 2678 } // namespace v8 |
2697 | 2679 |
2698 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ | 2680 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |