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

Side by Side Diff: src/compiler/code-generator.h

Issue 707803002: [turbofan] move label generation to code generator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.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 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_COMPILER_CODE_GENERATOR_H_ 5 #ifndef V8_COMPILER_CODE_GENERATOR_H_
6 #define V8_COMPILER_CODE_GENERATOR_H_ 6 #define V8_COMPILER_CODE_GENERATOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 15 matching lines...) Expand all
26 InstructionSequence* code, CompilationInfo* info); 26 InstructionSequence* code, CompilationInfo* info);
27 27
28 // Generate native code. 28 // Generate native code.
29 Handle<Code> GenerateCode(); 29 Handle<Code> GenerateCode();
30 30
31 InstructionSequence* code() const { return code_; } 31 InstructionSequence* code() const { return code_; }
32 Frame* frame() const { return frame_; } 32 Frame* frame() const { return frame_; }
33 Isolate* isolate() const { return zone()->isolate(); } 33 Isolate* isolate() const { return zone()->isolate(); }
34 Linkage* linkage() const { return linkage_; } 34 Linkage* linkage() const { return linkage_; }
35 35
36 Label* GetLabel(BasicBlock::RpoNumber rpo) { return &labels_[rpo.ToSize()]; }
37
36 private: 38 private:
37 MacroAssembler* masm() { return &masm_; } 39 MacroAssembler* masm() { return &masm_; }
38 GapResolver* resolver() { return &resolver_; } 40 GapResolver* resolver() { return &resolver_; }
39 SafepointTableBuilder* safepoints() { return &safepoints_; } 41 SafepointTableBuilder* safepoints() { return &safepoints_; }
40 Zone* zone() const { return code()->zone(); } 42 Zone* zone() const { return code()->zone(); }
41 CompilationInfo* info() const { return info_; } 43 CompilationInfo* info() const { return info_; }
42 44
43 // Checks if {block} will appear directly after {current_block_} when 45 // Checks if {block} will appear directly after {current_block_} when
44 // assembling code, in which case, a fall-through can be used. 46 // assembling code, in which case, a fall-through can be used.
45 bool IsNextInAssemblyOrder(BasicBlock::RpoNumber block) const; 47 bool IsNextInAssemblyOrder(BasicBlock::RpoNumber block) const;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 private: 117 private:
116 BailoutId bailout_id_; 118 BailoutId bailout_id_;
117 int translation_id_; 119 int translation_id_;
118 int pc_offset_; 120 int pc_offset_;
119 }; 121 };
120 122
121 Frame* const frame_; 123 Frame* const frame_;
122 Linkage* const linkage_; 124 Linkage* const linkage_;
123 InstructionSequence* const code_; 125 InstructionSequence* const code_;
124 CompilationInfo* const info_; 126 CompilationInfo* const info_;
127 Label* const labels_;
125 BasicBlock::RpoNumber current_block_; 128 BasicBlock::RpoNumber current_block_;
126 SourcePosition current_source_position_; 129 SourcePosition current_source_position_;
127 MacroAssembler masm_; 130 MacroAssembler masm_;
128 GapResolver resolver_; 131 GapResolver resolver_;
129 SafepointTableBuilder safepoints_; 132 SafepointTableBuilder safepoints_;
130 ZoneDeque<DeoptimizationState*> deoptimization_states_; 133 ZoneDeque<DeoptimizationState*> deoptimization_states_;
131 ZoneDeque<Handle<Object> > deoptimization_literals_; 134 ZoneDeque<Handle<Object> > deoptimization_literals_;
132 TranslationBuffer translations_; 135 TranslationBuffer translations_;
133 int last_lazy_deopt_pc_; 136 int last_lazy_deopt_pc_;
134 }; 137 };
135 138
136 } // namespace compiler 139 } // namespace compiler
137 } // namespace internal 140 } // namespace internal
138 } // namespace v8 141 } // namespace v8
139 142
140 #endif // V8_COMPILER_CODE_GENERATOR_H 143 #endif // V8_COMPILER_CODE_GENERATOR_H
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698