OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_INTERPRETER_BYTECODE_GENERATOR_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/interpreter/bytecode-array-builder.h" | 9 #include "src/interpreter/bytecode-array-builder.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 return builder()->register_allocator(); | 202 return builder()->register_allocator(); |
203 } | 203 } |
204 | 204 |
205 GlobalDeclarationsBuilder* globals_builder() { | 205 GlobalDeclarationsBuilder* globals_builder() { |
206 DCHECK_NOT_NULL(globals_builder_); | 206 DCHECK_NOT_NULL(globals_builder_); |
207 return globals_builder_; | 207 return globals_builder_; |
208 } | 208 } |
209 inline LanguageMode language_mode() const; | 209 inline LanguageMode language_mode() const; |
210 int feedback_index(FeedbackSlot slot) const; | 210 int feedback_index(FeedbackSlot slot) const; |
211 | 211 |
| 212 void set_source_url_entry(size_t entry) { |
| 213 has_source_url_entry_ = true; |
| 214 source_url_entry_ = entry; |
| 215 } |
| 216 |
| 217 size_t source_url_entry() const { return source_url_entry_; } |
| 218 bool has_source_url_entry() const { return has_source_url_entry_; } |
| 219 |
212 Zone* zone_; | 220 Zone* zone_; |
213 BytecodeArrayBuilder* builder_; | 221 BytecodeArrayBuilder* builder_; |
214 CompilationInfo* info_; | 222 CompilationInfo* info_; |
215 const AstStringConstants* ast_string_constants_; | 223 const AstStringConstants* ast_string_constants_; |
216 DeclarationScope* closure_scope_; | 224 DeclarationScope* closure_scope_; |
217 Scope* current_scope_; | 225 Scope* current_scope_; |
218 | 226 |
219 GlobalDeclarationsBuilder* globals_builder_; | 227 GlobalDeclarationsBuilder* globals_builder_; |
220 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; | 228 ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; |
221 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; | 229 ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; |
222 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> | 230 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> |
223 native_function_literals_; | 231 native_function_literals_; |
224 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; | 232 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; |
225 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; | 233 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; |
226 | 234 |
227 ControlScope* execution_control_; | 235 ControlScope* execution_control_; |
228 ContextScope* execution_context_; | 236 ContextScope* execution_context_; |
229 ExpressionResultScope* execution_result_; | 237 ExpressionResultScope* execution_result_; |
230 | 238 |
231 ZoneVector<BytecodeLabel> generator_resume_points_; | 239 ZoneVector<BytecodeLabel> generator_resume_points_; |
232 Register generator_state_; | 240 Register generator_state_; |
233 int loop_depth_; | 241 int loop_depth_; |
| 242 size_t source_url_entry_; |
| 243 bool has_source_url_entry_; |
234 }; | 244 }; |
235 | 245 |
236 } // namespace interpreter | 246 } // namespace interpreter |
237 } // namespace internal | 247 } // namespace internal |
238 } // namespace v8 | 248 } // namespace v8 |
239 | 249 |
240 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 250 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
OLD | NEW |