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 "include/v8.h" | 8 #include "include/v8.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
11 #include "src/objects/scope-info.h" | 11 #include "src/objects/scope-info.h" |
| 12 #include "src/zone/zone-containers.h" |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 | 15 |
15 class Extension; | 16 class Extension; |
16 | 17 |
17 namespace internal { | 18 namespace internal { |
18 | 19 |
19 class AstRawString; | 20 class AstRawString; |
20 class AstValueFactory; | 21 class AstValueFactory; |
21 class DeclarationScope; | 22 class DeclarationScope; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 118 } |
118 | 119 |
119 const AstRawString* function_name() const { return function_name_; } | 120 const AstRawString* function_name() const { return function_name_; } |
120 void set_function_name(const AstRawString* function_name) { | 121 void set_function_name(const AstRawString* function_name) { |
121 function_name_ = function_name; | 122 function_name_ = function_name; |
122 } | 123 } |
123 | 124 |
124 FunctionLiteral* literal() const { return literal_; } | 125 FunctionLiteral* literal() const { return literal_; } |
125 void set_literal(FunctionLiteral* literal) { literal_ = literal; } | 126 void set_literal(FunctionLiteral* literal) { literal_ = literal; } |
126 | 127 |
| 128 ThreadedList<ThreadedListZoneEntry<FunctionLiteral*>>* |
| 129 eager_inner_function_literals() { |
| 130 return &eager_inner_function_literals_; |
| 131 } |
| 132 |
127 DeclarationScope* scope() const; | 133 DeclarationScope* scope() const; |
128 | 134 |
129 UnicodeCache* unicode_cache() const { return unicode_cache_; } | 135 UnicodeCache* unicode_cache() const { return unicode_cache_; } |
130 void set_unicode_cache(UnicodeCache* unicode_cache) { | 136 void set_unicode_cache(UnicodeCache* unicode_cache) { |
131 unicode_cache_ = unicode_cache; | 137 unicode_cache_ = unicode_cache; |
132 } | 138 } |
133 | 139 |
134 uintptr_t stack_limit() const { return stack_limit_; } | 140 uintptr_t stack_limit() const { return stack_limit_; } |
135 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } | 141 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } |
136 | 142 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; | 255 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; |
250 | 256 |
251 //----------- Inputs+Outputs of parsing and scope analysis ----------------- | 257 //----------- Inputs+Outputs of parsing and scope analysis ----------------- |
252 ScriptData** cached_data_; // used if available, populated if requested. | 258 ScriptData** cached_data_; // used if available, populated if requested. |
253 AstValueFactory* ast_value_factory_; // used if available, otherwise new. | 259 AstValueFactory* ast_value_factory_; // used if available, otherwise new. |
254 const AstRawString* function_name_; | 260 const AstRawString* function_name_; |
255 | 261 |
256 //----------- Output of parsing and scope analysis ------------------------ | 262 //----------- Output of parsing and scope analysis ------------------------ |
257 FunctionLiteral* literal_; | 263 FunctionLiteral* literal_; |
258 | 264 |
| 265 //----------- Output of renumbering ------------------------ |
| 266 ThreadedList<ThreadedListZoneEntry<FunctionLiteral*>> |
| 267 eager_inner_function_literals_; |
| 268 |
259 void SetFlag(Flag f) { flags_ |= f; } | 269 void SetFlag(Flag f) { flags_ |= f; } |
260 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 270 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
261 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 271 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
262 }; | 272 }; |
263 | 273 |
264 } // namespace internal | 274 } // namespace internal |
265 } // namespace v8 | 275 } // namespace v8 |
266 | 276 |
267 #endif // V8_PARSING_PARSE_INFO_H_ | 277 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |