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_COMPILER_CODE_GENERATOR_IMPL_H_ | 5 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_ |
6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ | 6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ |
7 | 7 |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler/code-generator.h" | 9 #include "src/compiler/code-generator.h" |
10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
(...skipping 100 matching lines...) Loading... |
111 Frame* frame() const { return gen_->frame(); } | 111 Frame* frame() const { return gen_->frame(); } |
112 Isolate* isolate() const { return gen_->isolate(); } | 112 Isolate* isolate() const { return gen_->isolate(); } |
113 Linkage* linkage() const { return gen_->linkage(); } | 113 Linkage* linkage() const { return gen_->linkage(); } |
114 | 114 |
115 protected: | 115 protected: |
116 CodeGenerator* gen_; | 116 CodeGenerator* gen_; |
117 Instruction* instr_; | 117 Instruction* instr_; |
118 }; | 118 }; |
119 | 119 |
120 | 120 |
| 121 // Generator for out-of-line code that is emitted after the main code is done. |
| 122 class OutOfLineCode : public ZoneObject { |
| 123 public: |
| 124 explicit OutOfLineCode(CodeGenerator* gen); |
| 125 virtual ~OutOfLineCode(); |
| 126 |
| 127 virtual void Generate() = 0; |
| 128 |
| 129 Label* entry() { return &entry_; } |
| 130 Label* exit() { return &exit_; } |
| 131 MacroAssembler* masm() const { return masm_; } |
| 132 OutOfLineCode* next() const { return next_; } |
| 133 |
| 134 private: |
| 135 Label entry_; |
| 136 Label exit_; |
| 137 MacroAssembler* const masm_; |
| 138 OutOfLineCode* const next_; |
| 139 }; |
| 140 |
| 141 |
121 // TODO(dcarney): generify this on bleeding_edge and replace this call | 142 // TODO(dcarney): generify this on bleeding_edge and replace this call |
122 // when merged. | 143 // when merged. |
123 static inline void FinishCode(MacroAssembler* masm) { | 144 static inline void FinishCode(MacroAssembler* masm) { |
124 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM | 145 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM |
125 masm->CheckConstPool(true, false); | 146 masm->CheckConstPool(true, false); |
126 #endif | 147 #endif |
127 } | 148 } |
128 | 149 |
129 } // namespace compiler | 150 } // namespace compiler |
130 } // namespace internal | 151 } // namespace internal |
131 } // namespace v8 | 152 } // namespace v8 |
132 | 153 |
133 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H | 154 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H |
OLD | NEW |