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

Unified Diff: src/parsing/parser-base.h

Issue 2164943002: Split NewScope into NewScope and NewScopeWithParent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 11416d508da93625d5b1fa9fffa1cf1bd9b3d49a..8014012ca4d46dd9a54830f51f26581c6c294dee 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -619,7 +619,11 @@ class ParserBase : public Traits {
return new (zone()) Scope(zone(), nullptr, SCRIPT_SCOPE, kNormalFunction);
}
- Scope* NewScope(Scope* parent, ScopeType scope_type) {
+ Scope* NewScope(ScopeType scope_type) {
+ return NewManualScope(scope(), scope_type);
+ }
+
+ Scope* NewManualScope(Scope* parent, ScopeType scope_type) {
// Must always use the specific constructors for the blacklisted scope
// types.
DCHECK_NE(FUNCTION_SCOPE, scope_type);
« src/parsing/parser.h ('K') | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698