Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: src/x64/lithium-x64.h

Issue 307593002: Preliminary support for block contexts in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port to other architectures Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64_LITHIUM_X64_H_ 5 #ifndef V8_X64_LITHIUM_X64_H_
6 #define V8_X64_LITHIUM_X64_H_ 6 #define V8_X64_LITHIUM_X64_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(Allocate) \ 23 V(Allocate) \
24 V(AllocateBlockContext) \
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) \
33 V(CallWithDescriptor) \ 34 V(CallWithDescriptor) \
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 inputs_[1] = index; 2622 inputs_[1] = index;
2621 } 2623 }
2622 2624
2623 LOperand* object() { return inputs_[0]; } 2625 LOperand* object() { return inputs_[0]; }
2624 LOperand* index() { return inputs_[1]; } 2626 LOperand* index() { return inputs_[1]; }
2625 2627
2626 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2628 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2627 }; 2629 };
2628 2630
2629 2631
2632 class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
2633 public:
2634 explicit LStoreFrameContext(LOperand* context) {
2635 inputs_[0] = context;
2636 }
2637
2638 LOperand* context() { return inputs_[0]; }
2639
2640 DECLARE_CONCRETE_INSTRUCTION(StoreFrameContext, "store-frame-context")
2641 };
2642
2643
2644 class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
2645 public:
2646 LAllocateBlockContext(LOperand* context, LOperand* function) {
2647 inputs_[0] = context;
2648 inputs_[1] = function;
2649 }
2650
2651 LOperand* context() { return inputs_[0]; }
2652 LOperand* function() { return inputs_[1]; }
2653
2654 Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
2655
2656 DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
2657 DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
2658 };
2659
2660
2630 class LChunkBuilder; 2661 class LChunkBuilder;
2631 class LPlatformChunk V8_FINAL : public LChunk { 2662 class LPlatformChunk V8_FINAL : public LChunk {
2632 public: 2663 public:
2633 LPlatformChunk(CompilationInfo* info, HGraph* graph) 2664 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2634 : LChunk(info, graph), 2665 : LChunk(info, graph),
2635 dehoisted_key_ids_(graph->GetMaximumValueID(), graph->zone()) { } 2666 dehoisted_key_ids_(graph->GetMaximumValueID(), graph->zone()) { }
2636 2667
2637 int GetNextSpillIndex(RegisterKind kind); 2668 int GetNextSpillIndex(RegisterKind kind);
2638 LOperand* GetNextSpillSlot(RegisterKind kind); 2669 LOperand* GetNextSpillSlot(RegisterKind kind);
2639 BitVector* GetDehoistedKeyIds() { return &dehoisted_key_ids_; } 2670 BitVector* GetDehoistedKeyIds() { return &dehoisted_key_ids_; }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 2839
2809 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2840 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2810 }; 2841 };
2811 2842
2812 #undef DECLARE_HYDROGEN_ACCESSOR 2843 #undef DECLARE_HYDROGEN_ACCESSOR
2813 #undef DECLARE_CONCRETE_INSTRUCTION 2844 #undef DECLARE_CONCRETE_INSTRUCTION
2814 2845
2815 } } // namespace v8::int 2846 } } // namespace v8::int
2816 2847
2817 #endif // V8_X64_LITHIUM_X64_H_ 2848 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698