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_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 "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/instruction.h" | 9 #include "src/compiler/instruction.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class CodeGenerator FINAL : public GapResolver::Assembler { | 31 class CodeGenerator FINAL : public GapResolver::Assembler { |
32 public: | 32 public: |
33 explicit CodeGenerator(Frame* frame, Linkage* linkage, | 33 explicit CodeGenerator(Frame* frame, Linkage* linkage, |
34 InstructionSequence* code, CompilationInfo* info); | 34 InstructionSequence* code, CompilationInfo* info); |
35 | 35 |
36 // Generate native code. | 36 // Generate native code. |
37 Handle<Code> GenerateCode(); | 37 Handle<Code> GenerateCode(); |
38 | 38 |
39 InstructionSequence* code() const { return code_; } | 39 InstructionSequence* code() const { return code_; } |
40 Frame* frame() const { return frame_; } | 40 Frame* frame() const { return frame_; } |
41 Isolate* isolate() const { return zone()->isolate(); } | 41 Isolate* isolate() const { return info_->isolate(); } |
42 Linkage* linkage() const { return linkage_; } | 42 Linkage* linkage() const { return linkage_; } |
43 | 43 |
44 Label* GetLabel(BasicBlock::RpoNumber rpo) { return &labels_[rpo.ToSize()]; } | 44 Label* GetLabel(BasicBlock::RpoNumber rpo) { return &labels_[rpo.ToSize()]; } |
45 | 45 |
46 private: | 46 private: |
47 MacroAssembler* masm() { return &masm_; } | 47 MacroAssembler* masm() { return &masm_; } |
48 GapResolver* resolver() { return &resolver_; } | 48 GapResolver* resolver() { return &resolver_; } |
49 SafepointTableBuilder* safepoints() { return &safepoints_; } | 49 SafepointTableBuilder* safepoints() { return &safepoints_; } |
50 Zone* zone() const { return code()->zone(); } | 50 Zone* zone() const { return code()->zone(); } |
51 CompilationInfo* info() const { return info_; } | 51 CompilationInfo* info() const { return info_; } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 int last_lazy_deopt_pc_; | 147 int last_lazy_deopt_pc_; |
148 OutOfLineCode* ools_; | 148 OutOfLineCode* ools_; |
149 int osr_pc_offset_; | 149 int osr_pc_offset_; |
150 }; | 150 }; |
151 | 151 |
152 } // namespace compiler | 152 } // namespace compiler |
153 } // namespace internal | 153 } // namespace internal |
154 } // namespace v8 | 154 } // namespace v8 |
155 | 155 |
156 #endif // V8_COMPILER_CODE_GENERATOR_H | 156 #endif // V8_COMPILER_CODE_GENERATOR_H |
OLD | NEW |