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