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

Side by Side Diff: src/parsing/parser.cc

Issue 1544483002: [es6] use correct --harmony-destructuring-assignment flag when preparsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 12 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 | test/mjsunit/harmony/destructuring-assignment-lazy.js » ('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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-visitor.h" 9 #include "src/ast/ast-expression-visitor.h"
10 #include "src/ast/ast-literal-reindexer.h" 10 #include "src/ast/ast-literal-reindexer.h"
(...skipping 4906 matching lines...) Expand 10 before | Expand all | Expand 10 after
4917 if (reusable_preparser_ == NULL) { 4917 if (reusable_preparser_ == NULL) {
4918 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4918 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4919 NULL, stack_limit_); 4919 NULL, stack_limit_);
4920 reusable_preparser_->set_allow_lazy(true); 4920 reusable_preparser_->set_allow_lazy(true);
4921 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); 4921 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
4922 SET_ALLOW(natives); 4922 SET_ALLOW(natives);
4923 SET_ALLOW(harmony_sloppy); 4923 SET_ALLOW(harmony_sloppy);
4924 SET_ALLOW(harmony_sloppy_let); 4924 SET_ALLOW(harmony_sloppy_let);
4925 SET_ALLOW(harmony_default_parameters); 4925 SET_ALLOW(harmony_default_parameters);
4926 SET_ALLOW(harmony_destructuring_bind); 4926 SET_ALLOW(harmony_destructuring_bind);
4927 SET_ALLOW(harmony_destructuring_assignment);
4927 SET_ALLOW(strong_mode); 4928 SET_ALLOW(strong_mode);
4928 SET_ALLOW(harmony_do_expressions); 4929 SET_ALLOW(harmony_do_expressions);
4929 SET_ALLOW(harmony_function_name); 4930 SET_ALLOW(harmony_function_name);
4930 #undef SET_ALLOW 4931 #undef SET_ALLOW
4931 } 4932 }
4932 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4933 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4933 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), 4934 language_mode(), function_state_->kind(), scope_->has_simple_parameters(),
4934 logger, bookmark); 4935 logger, bookmark);
4935 if (pre_parse_timer_ != NULL) { 4936 if (pre_parse_timer_ != NULL) {
4936 pre_parse_timer_->Stop(); 4937 pre_parse_timer_->Stop();
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
6593 6594
6594 void ParserTraits::QueueDestructuringAssignmentForRewriting(Expression* expr) { 6595 void ParserTraits::QueueDestructuringAssignmentForRewriting(Expression* expr) {
6595 DCHECK(expr->IsRewritableAssignmentExpression()); 6596 DCHECK(expr->IsRewritableAssignmentExpression());
6596 parser_->function_state_->AddDestructuringAssignment( 6597 parser_->function_state_->AddDestructuringAssignment(
6597 Parser::DestructuringAssignment(expr, parser_->scope_)); 6598 Parser::DestructuringAssignment(expr, parser_->scope_));
6598 } 6599 }
6599 6600
6600 6601
6601 } // namespace internal 6602 } // namespace internal
6602 } // namespace v8 6603 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/destructuring-assignment-lazy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698