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

Side by Side Diff: src/parser.cc

Issue 1324033002: Revert of Stage sloppy let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | test/test262-es6/test262-es6.status » ('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 #include "src/parser.h" 5 #include "src/parser.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 3576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 if (num_decl != 1) { 3587 if (num_decl != 1) {
3588 const char* loop_type = 3588 const char* loop_type =
3589 mode == ForEachStatement::ITERATE ? "for-of" : "for-in"; 3589 mode == ForEachStatement::ITERATE ? "for-of" : "for-in";
3590 ParserTraits::ReportMessageAt( 3590 ParserTraits::ReportMessageAt(
3591 parsing_result.bindings_loc, 3591 parsing_result.bindings_loc,
3592 MessageTemplate::kForInOfLoopMultiBindings, loop_type); 3592 MessageTemplate::kForInOfLoopMultiBindings, loop_type);
3593 *ok = false; 3593 *ok = false;
3594 return nullptr; 3594 return nullptr;
3595 } 3595 }
3596 if (parsing_result.first_initializer_loc.IsValid() && 3596 if (parsing_result.first_initializer_loc.IsValid() &&
3597 (is_strict(language_mode()) || mode == ForEachStatement::ITERATE || 3597 (is_strict(language_mode()) || mode == ForEachStatement::ITERATE)) {
3598 IsLexicalVariableMode(parsing_result.descriptor.mode))) {
3599 if (mode == ForEachStatement::ITERATE) { 3598 if (mode == ForEachStatement::ITERATE) {
3600 ReportMessageAt(parsing_result.first_initializer_loc, 3599 ReportMessageAt(parsing_result.first_initializer_loc,
3601 MessageTemplate::kForOfLoopInitializer); 3600 MessageTemplate::kForOfLoopInitializer);
3602 } else { 3601 } else {
3603 // TODO(caitp): This should be an error in sloppy mode too. 3602 // TODO(caitp): This should be an error in sloppy mode too.
3604 ReportMessageAt(parsing_result.first_initializer_loc, 3603 ReportMessageAt(parsing_result.first_initializer_loc,
3605 MessageTemplate::kForInLoopInitializer); 3604 MessageTemplate::kForInLoopInitializer);
3606 } 3605 }
3607 *ok = false; 3606 *ok = false;
3608 return nullptr; 3607 return nullptr;
(...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 6113
6115 Expression* Parser::SpreadCallNew(Expression* function, 6114 Expression* Parser::SpreadCallNew(Expression* function,
6116 ZoneList<v8::internal::Expression*>* args, 6115 ZoneList<v8::internal::Expression*>* args,
6117 int pos) { 6116 int pos) {
6118 args->InsertAt(0, function, zone()); 6117 args->InsertAt(0, function, zone());
6119 6118
6120 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6119 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6121 } 6120 }
6122 } // namespace internal 6121 } // namespace internal
6123 } // namespace v8 6122 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698