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

Side by Side Diff: src/parsing/parser-base.h

Issue 2417643003: Turn AllowsLazyParsingWithoutUnresolvedVariables into a whitelist stopping at the outer parsed cont… (Closed)
Patch Set: Created 4 years, 2 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/parsing/parser.cc ('k') | src/parsing/preparser.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_PARSER_BASE_H 5 #ifndef V8_PARSING_PARSER_BASE_H
6 #define V8_PARSING_PARSER_BASE_H 6 #define V8_PARSING_PARSER_BASE_H
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 3906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 int expected_property_count = -1; 3917 int expected_property_count = -1;
3918 3918
3919 FunctionKind kind = formal_parameters.scope->function_kind(); 3919 FunctionKind kind = formal_parameters.scope->function_kind();
3920 FunctionLiteral::EagerCompileHint eager_compile_hint = 3920 FunctionLiteral::EagerCompileHint eager_compile_hint =
3921 default_eager_compile_hint_; 3921 default_eager_compile_hint_;
3922 bool can_preparse = mode() == PARSE_LAZILY && 3922 bool can_preparse = mode() == PARSE_LAZILY &&
3923 eager_compile_hint == FunctionLiteral::kShouldLazyCompile; 3923 eager_compile_hint == FunctionLiteral::kShouldLazyCompile;
3924 // TODO(marja): consider lazy-parsing inner arrow functions too. is_this 3924 // TODO(marja): consider lazy-parsing inner arrow functions too. is_this
3925 // handling in Scope::ResolveVariable needs to change. 3925 // handling in Scope::ResolveVariable needs to change.
3926 bool is_lazy_top_level_function = 3926 bool is_lazy_top_level_function =
3927 can_preparse && scope()->AllowsLazyParsingWithoutUnresolvedVariables(); 3927 can_preparse && impl()->AllowsLazyParsingWithoutUnresolvedVariables();
3928 bool should_be_used_once_hint = false; 3928 bool should_be_used_once_hint = false;
3929 { 3929 {
3930 FunctionState function_state(&function_state_, &scope_state_, 3930 FunctionState function_state(&function_state_, &scope_state_,
3931 formal_parameters.scope); 3931 formal_parameters.scope);
3932 3932
3933 function_state.SkipMaterializedLiterals( 3933 function_state.SkipMaterializedLiterals(
3934 formal_parameters.materialized_literals_count); 3934 formal_parameters.materialized_literals_count);
3935 3935
3936 impl()->ReindexLiterals(formal_parameters); 3936 impl()->ReindexLiterals(formal_parameters);
3937 3937
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5446 has_seen_constructor_ = true; 5446 has_seen_constructor_ = true;
5447 return; 5447 return;
5448 } 5448 }
5449 } 5449 }
5450 5450
5451 5451
5452 } // namespace internal 5452 } // namespace internal
5453 } // namespace v8 5453 } // namespace v8
5454 5454
5455 #endif // V8_PARSING_PARSER_BASE_H 5455 #endif // V8_PARSING_PARSER_BASE_H
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698