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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Generator for out-of-line code that is emitted after the main code is done. | 140 // Generator for out-of-line code that is emitted after the main code is done. |
141 class OutOfLineCode : public ZoneObject { | 141 class OutOfLineCode : public ZoneObject { |
142 public: | 142 public: |
143 explicit OutOfLineCode(CodeGenerator* gen); | 143 explicit OutOfLineCode(CodeGenerator* gen); |
144 virtual ~OutOfLineCode(); | 144 virtual ~OutOfLineCode(); |
145 | 145 |
146 virtual void Generate() = 0; | 146 virtual void Generate() = 0; |
147 | 147 |
148 Label* entry() { return &entry_; } | 148 Label* entry() { return &entry_; } |
149 Label* exit() { return &exit_; } | 149 Label* exit() { return &exit_; } |
| 150 Frame* frame() const { return frame_; } |
| 151 Isolate* isolate() const { return masm()->isolate(); } |
150 MacroAssembler* masm() const { return masm_; } | 152 MacroAssembler* masm() const { return masm_; } |
151 OutOfLineCode* next() const { return next_; } | 153 OutOfLineCode* next() const { return next_; } |
152 | 154 |
153 private: | 155 private: |
154 Label entry_; | 156 Label entry_; |
155 Label exit_; | 157 Label exit_; |
| 158 Frame* const frame_; |
156 MacroAssembler* const masm_; | 159 MacroAssembler* const masm_; |
157 OutOfLineCode* const next_; | 160 OutOfLineCode* const next_; |
158 }; | 161 }; |
159 | 162 |
160 | 163 |
161 // TODO(dcarney): generify this on bleeding_edge and replace this call | 164 // TODO(dcarney): generify this on bleeding_edge and replace this call |
162 // when merged. | 165 // when merged. |
163 static inline void FinishCode(MacroAssembler* masm) { | 166 static inline void FinishCode(MacroAssembler* masm) { |
164 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM | 167 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM |
165 masm->CheckConstPool(true, false); | 168 masm->CheckConstPool(true, false); |
166 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 | 169 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
167 masm->ud2(); | 170 masm->ud2(); |
168 #endif | 171 #endif |
169 } | 172 } |
170 | 173 |
171 } // namespace compiler | 174 } // namespace compiler |
172 } // namespace internal | 175 } // namespace internal |
173 } // namespace v8 | 176 } // namespace v8 |
174 | 177 |
175 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H | 178 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H |
OLD | NEW |