Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: src/parsing/parse-info.h

Issue 2618553004: [compiler] Collect eager inner functions for compilation during renumbering. (Closed)
Patch Set: Remove unused variable Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 ZoneVector<FunctionLiteral*>* eager_inner_function_literals() {
129 return &eager_inner_function_literals_;
130 }
131
127 DeclarationScope* scope() const; 132 DeclarationScope* scope() const;
128 133
129 UnicodeCache* unicode_cache() const { return unicode_cache_; } 134 UnicodeCache* unicode_cache() const { return unicode_cache_; }
130 void set_unicode_cache(UnicodeCache* unicode_cache) { 135 void set_unicode_cache(UnicodeCache* unicode_cache) {
131 unicode_cache_ = unicode_cache; 136 unicode_cache_ = unicode_cache;
132 } 137 }
133 138
134 uintptr_t stack_limit() const { return stack_limit_; } 139 uintptr_t stack_limit() const { return stack_limit_; }
135 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } 140 void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; }
136 141
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; 256 MaybeHandle<ScopeInfo> maybe_outer_scope_info_;
252 257
253 //----------- Inputs+Outputs of parsing and scope analysis ----------------- 258 //----------- Inputs+Outputs of parsing and scope analysis -----------------
254 ScriptData** cached_data_; // used if available, populated if requested. 259 ScriptData** cached_data_; // used if available, populated if requested.
255 AstValueFactory* ast_value_factory_; // used if available, otherwise new. 260 AstValueFactory* ast_value_factory_; // used if available, otherwise new.
256 const AstRawString* function_name_; 261 const AstRawString* function_name_;
257 262
258 //----------- Output of parsing and scope analysis ------------------------ 263 //----------- Output of parsing and scope analysis ------------------------
259 FunctionLiteral* literal_; 264 FunctionLiteral* literal_;
260 265
266 //----------- Output of renumbering ------------------------
267 ZoneVector<FunctionLiteral*> eager_inner_function_literals_;
268
261 void SetFlag(Flag f) { flags_ |= f; } 269 void SetFlag(Flag f) { flags_ |= f; }
262 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; }
263 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } 271 bool GetFlag(Flag f) const { return (flags_ & f) != 0; }
264 }; 272 };
265 273
266 } // namespace internal 274 } // namespace internal
267 } // namespace v8 275 } // namespace v8
268 276
269 #endif // V8_PARSING_PARSE_INFO_H_ 277 #endif // V8_PARSING_PARSE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698