OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_PARSING_PARSE_INFO_H_ | 5 #ifndef V8_PARSING_PARSE_INFO_H_ |
6 #define V8_PARSING_PARSE_INFO_H_ | 6 #define V8_PARSING_PARSE_INFO_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "include/v8.h" | 10 #include "include/v8.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 int start_position() const { return start_position_; } | 162 int start_position() const { return start_position_; } |
163 void set_start_position(int start_position) { | 163 void set_start_position(int start_position) { |
164 start_position_ = start_position; | 164 start_position_ = start_position; |
165 } | 165 } |
166 | 166 |
167 int end_position() const { return end_position_; } | 167 int end_position() const { return end_position_; } |
168 void set_end_position(int end_position) { end_position_ = end_position; } | 168 void set_end_position(int end_position) { end_position_ = end_position; } |
169 | 169 |
| 170 int parameters_end_pos() const { return parameters_end_pos_; } |
| 171 void set_parameters_end_pos(int parameters_end_pos) { |
| 172 parameters_end_pos_ = parameters_end_pos; |
| 173 } |
| 174 |
170 int function_literal_id() const { return function_literal_id_; } | 175 int function_literal_id() const { return function_literal_id_; } |
171 void set_function_literal_id(int function_literal_id) { | 176 void set_function_literal_id(int function_literal_id) { |
172 function_literal_id_ = function_literal_id; | 177 function_literal_id_ = function_literal_id; |
173 } | 178 } |
174 | 179 |
175 int max_function_literal_id() const { return max_function_literal_id_; } | 180 int max_function_literal_id() const { return max_function_literal_id_; } |
176 void set_max_function_literal_id(int max_function_literal_id) { | 181 void set_max_function_literal_id(int max_function_literal_id) { |
177 max_function_literal_id_ = max_function_literal_id; | 182 max_function_literal_id_ = max_function_literal_id; |
178 } | 183 } |
179 | 184 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 v8::Extension* extension_; | 258 v8::Extension* extension_; |
254 ScriptCompiler::CompileOptions compile_options_; | 259 ScriptCompiler::CompileOptions compile_options_; |
255 DeclarationScope* script_scope_; | 260 DeclarationScope* script_scope_; |
256 DeclarationScope* asm_function_scope_; | 261 DeclarationScope* asm_function_scope_; |
257 UnicodeCache* unicode_cache_; | 262 UnicodeCache* unicode_cache_; |
258 uintptr_t stack_limit_; | 263 uintptr_t stack_limit_; |
259 uint32_t hash_seed_; | 264 uint32_t hash_seed_; |
260 int compiler_hints_; | 265 int compiler_hints_; |
261 int start_position_; | 266 int start_position_; |
262 int end_position_; | 267 int end_position_; |
| 268 int parameters_end_pos_; |
263 int function_literal_id_; | 269 int function_literal_id_; |
264 int max_function_literal_id_; | 270 int max_function_literal_id_; |
265 | 271 |
266 // TODO(titzer): Move handles and isolate out of ParseInfo. | 272 // TODO(titzer): Move handles and isolate out of ParseInfo. |
267 Isolate* isolate_; | 273 Isolate* isolate_; |
268 Handle<SharedFunctionInfo> shared_; | 274 Handle<SharedFunctionInfo> shared_; |
269 Handle<Script> script_; | 275 Handle<Script> script_; |
270 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; | 276 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; |
271 | 277 |
272 //----------- Inputs+Outputs of parsing and scope analysis ----------------- | 278 //----------- Inputs+Outputs of parsing and scope analysis ----------------- |
273 ScriptData** cached_data_; // used if available, populated if requested. | 279 ScriptData** cached_data_; // used if available, populated if requested. |
274 PreParsedScopeData preparsed_scope_data_; | 280 PreParsedScopeData preparsed_scope_data_; |
275 AstValueFactory* ast_value_factory_; // used if available, otherwise new. | 281 AstValueFactory* ast_value_factory_; // used if available, otherwise new. |
276 const AstRawString* function_name_; | 282 const AstRawString* function_name_; |
277 | 283 |
278 //----------- Output of parsing and scope analysis ------------------------ | 284 //----------- Output of parsing and scope analysis ------------------------ |
279 FunctionLiteral* literal_; | 285 FunctionLiteral* literal_; |
280 std::shared_ptr<DeferredHandles> deferred_handles_; | 286 std::shared_ptr<DeferredHandles> deferred_handles_; |
281 | 287 |
282 void SetFlag(Flag f) { flags_ |= f; } | 288 void SetFlag(Flag f) { flags_ |= f; } |
283 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 289 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
284 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 290 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
285 }; | 291 }; |
286 | 292 |
287 } // namespace internal | 293 } // namespace internal |
288 } // namespace v8 | 294 } // namespace v8 |
289 | 295 |
290 #endif // V8_PARSING_PARSE_INFO_H_ | 296 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |