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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return gen_->frame_access_state(); | 132 return gen_->frame_access_state(); |
133 } | 133 } |
134 Isolate* isolate() const { return gen_->isolate(); } | 134 Isolate* isolate() const { return gen_->isolate(); } |
135 Linkage* linkage() const { return gen_->linkage(); } | 135 Linkage* linkage() const { return gen_->linkage(); } |
136 | 136 |
137 protected: | 137 protected: |
138 CodeGenerator* gen_; | 138 CodeGenerator* gen_; |
139 Instruction* instr_; | 139 Instruction* instr_; |
140 }; | 140 }; |
141 | 141 |
| 142 // Eager deoptimization exit. |
| 143 class DeoptimizationExit : public ZoneObject { |
| 144 public: |
| 145 explicit DeoptimizationExit(int deoptimization_id) |
| 146 : deoptimization_id_(deoptimization_id) {} |
| 147 |
| 148 int deoptimization_id() const { return deoptimization_id_; } |
| 149 Label* label() { return &label_; } |
| 150 |
| 151 private: |
| 152 int const deoptimization_id_; |
| 153 Label label_; |
| 154 }; |
142 | 155 |
143 // Generator for out-of-line code that is emitted after the main code is done. | 156 // Generator for out-of-line code that is emitted after the main code is done. |
144 class OutOfLineCode : public ZoneObject { | 157 class OutOfLineCode : public ZoneObject { |
145 public: | 158 public: |
146 explicit OutOfLineCode(CodeGenerator* gen); | 159 explicit OutOfLineCode(CodeGenerator* gen); |
147 virtual ~OutOfLineCode(); | 160 virtual ~OutOfLineCode(); |
148 | 161 |
149 virtual void Generate() = 0; | 162 virtual void Generate() = 0; |
150 | 163 |
151 Label* entry() { return &entry_; } | 164 Label* entry() { return &entry_; } |
(...skipping 20 matching lines...) Expand all Loading... |
172 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 | 185 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
173 masm->ud2(); | 186 masm->ud2(); |
174 #endif | 187 #endif |
175 } | 188 } |
176 | 189 |
177 } // namespace compiler | 190 } // namespace compiler |
178 } // namespace internal | 191 } // namespace internal |
179 } // namespace v8 | 192 } // namespace v8 |
180 | 193 |
181 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H | 194 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H |
OLD | NEW |