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

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

Issue 2650703003: [parser]: Skipping inner funcs / initial implemetation of storing scope analysis data from preparse… (Closed)
Patch Set: rebased - argh, forced to format build.gn Created 3 years, 10 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/parsing/preparsed-scope-data.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 14
14 class Extension; 15 class Extension;
15 16
16 namespace internal { 17 namespace internal {
17 18
18 class AstRawString; 19 class AstRawString;
19 class AstValueFactory; 20 class AstValueFactory;
20 class DeclarationScope; 21 class DeclarationScope;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void set_character_stream(Utf16CharacterStream* character_stream) { 87 void set_character_stream(Utf16CharacterStream* character_stream) {
87 character_stream_ = character_stream; 88 character_stream_ = character_stream;
88 } 89 }
89 90
90 v8::Extension* extension() const { return extension_; } 91 v8::Extension* extension() const { return extension_; }
91 void set_extension(v8::Extension* extension) { extension_ = extension; } 92 void set_extension(v8::Extension* extension) { extension_ = extension; }
92 93
93 ScriptData** cached_data() const { return cached_data_; } 94 ScriptData** cached_data() const { return cached_data_; }
94 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; } 95 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; }
95 96
97 PreParsedScopeData* preparsed_scope_data() { return &preparsed_scope_data_; }
98
96 ScriptCompiler::CompileOptions compile_options() const { 99 ScriptCompiler::CompileOptions compile_options() const {
97 return compile_options_; 100 return compile_options_;
98 } 101 }
99 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { 102 void set_compile_options(ScriptCompiler::CompileOptions compile_options) {
100 compile_options_ = compile_options; 103 compile_options_ = compile_options;
101 } 104 }
102 105
103 DeclarationScope* script_scope() const { return script_scope_; } 106 DeclarationScope* script_scope() const { return script_scope_; }
104 void set_script_scope(DeclarationScope* script_scope) { 107 void set_script_scope(DeclarationScope* script_scope) {
105 script_scope_ = script_scope; 108 script_scope_ = script_scope;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 int max_function_literal_id_; 245 int max_function_literal_id_;
243 246
244 // TODO(titzer): Move handles and isolate out of ParseInfo. 247 // TODO(titzer): Move handles and isolate out of ParseInfo.
245 Isolate* isolate_; 248 Isolate* isolate_;
246 Handle<SharedFunctionInfo> shared_; 249 Handle<SharedFunctionInfo> shared_;
247 Handle<Script> script_; 250 Handle<Script> script_;
248 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; 251 MaybeHandle<ScopeInfo> maybe_outer_scope_info_;
249 252
250 //----------- Inputs+Outputs of parsing and scope analysis ----------------- 253 //----------- Inputs+Outputs of parsing and scope analysis -----------------
251 ScriptData** cached_data_; // used if available, populated if requested. 254 ScriptData** cached_data_; // used if available, populated if requested.
255 PreParsedScopeData preparsed_scope_data_;
252 AstValueFactory* ast_value_factory_; // used if available, otherwise new. 256 AstValueFactory* ast_value_factory_; // used if available, otherwise new.
253 const AstRawString* function_name_; 257 const AstRawString* function_name_;
254 258
255 //----------- Output of parsing and scope analysis ------------------------ 259 //----------- Output of parsing and scope analysis ------------------------
256 FunctionLiteral* literal_; 260 FunctionLiteral* literal_;
257 261
258 void SetFlag(Flag f) { flags_ |= f; } 262 void SetFlag(Flag f) { flags_ |= f; }
259 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } 263 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; }
260 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } 264 bool GetFlag(Flag f) const { return (flags_ & f) != 0; }
261 }; 265 };
262 266
263 } // namespace internal 267 } // namespace internal
264 } // namespace v8 268 } // namespace v8
265 269
266 #endif // V8_PARSING_PARSE_INFO_H_ 270 #endif // V8_PARSING_PARSE_INFO_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698