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

Unified Diff: src/parsing/preparser.cc

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 2106c32ff777b8fbc945ad6d737e9611a117bced..0f65b3e26a58d89476b2eb1133a0992190cf4dbf 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -131,11 +131,11 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
use_counts_ = use_counts;
// Lazy functions always have trivial outer scopes (no with/catch scopes).
DCHECK_NULL(scope_state_);
- Scope* top_scope = NewScriptScope();
+ DeclarationScope* top_scope = NewScriptScope();
FunctionState top_state(&function_state_, &scope_state_, top_scope,
kNormalFunction);
scope()->SetLanguageMode(language_mode);
- Scope* function_scope = NewFunctionScope(kind);
+ DeclarationScope* function_scope = NewFunctionScope(kind);
if (!has_simple_parameters) function_scope->SetHasNonSimpleParameters();
FunctionState function_state(&function_state_, &scope_state_, function_scope,
kind);
@@ -1103,7 +1103,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
// Parse function body.
bool outer_is_script_scope = scope()->is_script_scope();
- Scope* function_scope = NewFunctionScope(kind);
+ DeclarationScope* function_scope = NewFunctionScope(kind);
function_scope->SetLanguageMode(language_mode);
FunctionState function_state(&function_state_, &scope_state_, function_scope,
kind);
« src/ast/scopes.cc ('K') | « src/parsing/preparser.h ('k') | src/parsing/rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698