OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_LITHIUM_PPC_H_ | 5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_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 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2449 class LStoreFrameContext : public LTemplateInstruction<0, 1, 0> { | 2448 class LStoreFrameContext : public LTemplateInstruction<0, 1, 0> { |
2450 public: | 2449 public: |
2451 explicit LStoreFrameContext(LOperand* context) { inputs_[0] = context; } | 2450 explicit LStoreFrameContext(LOperand* context) { inputs_[0] = context; } |
2452 | 2451 |
2453 LOperand* context() { return inputs_[0]; } | 2452 LOperand* context() { return inputs_[0]; } |
2454 | 2453 |
2455 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") | 2454 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context") |
2456 }; | 2455 }; |
2457 | 2456 |
2458 | 2457 |
2459 class LAllocateBlockContext : public LTemplateInstruction<1, 2, 0> { | |
2460 public: | |
2461 LAllocateBlockContext(LOperand* context, LOperand* function) { | |
2462 inputs_[0] = context; | |
2463 inputs_[1] = function; | |
2464 } | |
2465 | |
2466 LOperand* context() { return inputs_[0]; } | |
2467 LOperand* function() { return inputs_[1]; } | |
2468 | |
2469 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); } | |
2470 | |
2471 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context") | |
2472 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext) | |
2473 }; | |
2474 | |
2475 | |
2476 class LChunkBuilder; | 2458 class LChunkBuilder; |
2477 class LPlatformChunk final : public LChunk { | 2459 class LPlatformChunk final : public LChunk { |
2478 public: | 2460 public: |
2479 LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph) {} | 2461 LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph) {} |
2480 | 2462 |
2481 int GetNextSpillIndex(RegisterKind kind); | 2463 int GetNextSpillIndex(RegisterKind kind); |
2482 LOperand* GetNextSpillSlot(RegisterKind kind); | 2464 LOperand* GetNextSpillSlot(RegisterKind kind); |
2483 }; | 2465 }; |
2484 | 2466 |
2485 | 2467 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2614 | 2596 |
2615 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2597 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2616 }; | 2598 }; |
2617 | 2599 |
2618 #undef DECLARE_HYDROGEN_ACCESSOR | 2600 #undef DECLARE_HYDROGEN_ACCESSOR |
2619 #undef DECLARE_CONCRETE_INSTRUCTION | 2601 #undef DECLARE_CONCRETE_INSTRUCTION |
2620 } // namespace internal | 2602 } // namespace internal |
2621 } // namespace v8 | 2603 } // namespace v8 |
2622 | 2604 |
2623 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 2605 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
OLD | NEW |