OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_LITHIUM_CODEGEN_H_ | 5 #ifndef V8_LITHIUM_CODEGEN_H_ |
6 #define V8_LITHIUM_CODEGEN_H_ | 6 #define V8_LITHIUM_CODEGEN_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| 11 #include "src/deoptimizer.h" |
11 | 12 |
12 namespace v8 { | 13 namespace v8 { |
13 namespace internal { | 14 namespace internal { |
14 | 15 |
15 class LInstruction; | 16 class LInstruction; |
16 class LPlatformChunk; | 17 class LPlatformChunk; |
17 | 18 |
18 class LCodeGenBase BASE_EMBEDDED { | 19 class LCodeGenBase BASE_EMBEDDED { |
19 public: | 20 public: |
20 LCodeGenBase(LChunk* chunk, | 21 LCodeGenBase(LChunk* chunk, |
21 MacroAssembler* assembler, | 22 MacroAssembler* assembler, |
22 CompilationInfo* info); | 23 CompilationInfo* info); |
23 virtual ~LCodeGenBase() {} | 24 virtual ~LCodeGenBase() {} |
24 | 25 |
25 // Simple accessors. | 26 // Simple accessors. |
26 MacroAssembler* masm() const { return masm_; } | 27 MacroAssembler* masm() const { return masm_; } |
27 CompilationInfo* info() const { return info_; } | 28 CompilationInfo* info() const { return info_; } |
28 Isolate* isolate() const { return info_->isolate(); } | 29 Isolate* isolate() const { return info_->isolate(); } |
29 Factory* factory() const { return isolate()->factory(); } | 30 Factory* factory() const { return isolate()->factory(); } |
30 Heap* heap() const { return isolate()->heap(); } | 31 Heap* heap() const { return isolate()->heap(); } |
31 Zone* zone() const { return zone_; } | 32 Zone* zone() const { return zone_; } |
32 LPlatformChunk* chunk() const { return chunk_; } | 33 LPlatformChunk* chunk() const { return chunk_; } |
33 HGraph* graph() const; | 34 HGraph* graph() const; |
34 | 35 |
35 void FPRINTF_CHECKING Comment(const char* format, ...); | 36 void FPRINTF_CHECKING Comment(const char* format, ...); |
36 void DeoptComment(const char* mnemonic, const char* reason); | 37 void DeoptComment(const Deoptimizer::Reason& reason); |
37 | 38 |
38 bool GenerateBody(); | 39 bool GenerateBody(); |
39 virtual void GenerateBodyInstructionPre(LInstruction* instr) {} | 40 virtual void GenerateBodyInstructionPre(LInstruction* instr) {} |
40 virtual void GenerateBodyInstructionPost(LInstruction* instr) {} | 41 virtual void GenerateBodyInstructionPost(LInstruction* instr) {} |
41 | 42 |
42 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0; | 43 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0; |
43 virtual void RecordAndWritePosition(int position) = 0; | 44 virtual void RecordAndWritePosition(int position) = 0; |
44 | 45 |
45 int GetNextEmittedBlock() const; | 46 int GetNextEmittedBlock() const; |
46 | 47 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 79 |
79 // Methods for code dependencies. | 80 // Methods for code dependencies. |
80 void AddDeprecationDependency(Handle<Map> map); | 81 void AddDeprecationDependency(Handle<Map> map); |
81 void AddStabilityDependency(Handle<Map> map); | 82 void AddStabilityDependency(Handle<Map> map); |
82 }; | 83 }; |
83 | 84 |
84 | 85 |
85 } } // namespace v8::internal | 86 } } // namespace v8::internal |
86 | 87 |
87 #endif // V8_LITHIUM_CODEGEN_H_ | 88 #endif // V8_LITHIUM_CODEGEN_H_ |
OLD | NEW |