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

Unified Diff: src/parser.h

Issue 1371333004: [es6] Scoping & initialization for var shadowing non-simple parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments Created 5 years, 3 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
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index cf4cdad66bba7d1cf5c61021f65cedf73a02201e..822f78145b33549d44b2cc51a5a0e0ecd77456cc 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -1123,8 +1123,8 @@ class Parser : public ParserBase<ParserTraits> {
// Get odd-ball literals.
Literal* GetLiteralUndefined(int position);
- // For harmony block scoping mode: Check if the scope has conflicting var/let
- // declarations from different scopes. It covers for example
+ // Check if the scope has conflicting var/let declarations from different
+ // scopes. This covers for example
//
// function f() { { { var x; } let x; } }
// function g() { { var x; let x; } }
@@ -1134,6 +1134,10 @@ class Parser : public ParserBase<ParserTraits> {
// hoisted over such a scope.
void CheckConflictingVarDeclarations(Scope* scope, bool* ok);
+ // Insert initializer statements for var-bindings shadowing parameter bindings
+ // from a non-simple parameter list.
+ void InsertShadowingVarBindingInitializers(Block* block);
+
// Implement sloppy block-scoped functions, ES2015 Annex B 3.3
void InsertSloppyBlockFunctionVarBindings(Scope* scope, bool* ok);
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698