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

Side by Side Diff: src/parser.cc

Issue 1225413005: [es6] Check declaration conflicts between non-simple parameters and the function body (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | src/scopes.cc » ('J')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/ast-literal-reindexer.h" 9 #include "src/ast-literal-reindexer.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 4414 matching lines...) Expand 10 before | Expand all | Expand 10 after
4425 } 4425 }
4426 } 4426 }
4427 4427
4428 Expect(Token::RBRACE, CHECK_OK); 4428 Expect(Token::RBRACE, CHECK_OK);
4429 scope_->set_end_position(scanner()->location().end_pos); 4429 scope_->set_end_position(scanner()->location().end_pos);
4430 if (inner_scope != nullptr) { 4430 if (inner_scope != nullptr) {
4431 DCHECK(inner_block != nullptr); 4431 DCHECK(inner_block != nullptr);
4432 inner_scope->set_end_position(scanner()->location().end_pos); 4432 inner_scope->set_end_position(scanner()->location().end_pos);
4433 inner_scope = inner_scope->FinalizeBlockScope(); 4433 inner_scope = inner_scope->FinalizeBlockScope();
4434 inner_block->set_scope(inner_scope); 4434 inner_block->set_scope(inner_scope);
4435 if (inner_scope) CheckConflictingVarDeclarations(inner_scope, CHECK_OK);
adamk 2015/07/15 21:12:30 CHECK_OK shouldn't be used in a single-statement i
rossberg 2015/07/16 14:26:40 Done.
4435 } 4436 }
4436 4437
4437 return result; 4438 return result;
4438 } 4439 }
4439 4440
4440 4441
4441 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( 4442 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
4442 SingletonLogger* logger, Scanner::BookmarkScope* bookmark) { 4443 SingletonLogger* logger, Scanner::BookmarkScope* bookmark) {
4443 // This function may be called on a background thread too; record only the 4444 // This function may be called on a background thread too; record only the
4444 // main thread preparse times. 4445 // main thread preparse times.
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
5977 Expression* Parser::SpreadCallNew(Expression* function, 5978 Expression* Parser::SpreadCallNew(Expression* function,
5978 ZoneList<v8::internal::Expression*>* args, 5979 ZoneList<v8::internal::Expression*>* args,
5979 int pos) { 5980 int pos) {
5980 args->InsertAt(0, function, zone()); 5981 args->InsertAt(0, function, zone());
5981 5982
5982 return factory()->NewCallRuntime( 5983 return factory()->NewCallRuntime(
5983 ast_value_factory()->reflect_construct_string(), NULL, args, pos); 5984 ast_value_factory()->reflect_construct_string(), NULL, args, pos);
5984 } 5985 }
5985 } // namespace internal 5986 } // namespace internal
5986 } // namespace v8 5987 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/scopes.cc » ('j') | src/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698