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

Side by Side Diff: src/parser.h

Issue 1450193002: Rename destructuring flag to "--harmony-destructuring-bind" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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') | src/parser.cc » ('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 #ifndef V8_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { 1324 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
1325 return parser_->SpreadCallNew(function, args, pos); 1325 return parser_->SpreadCallNew(function, args, pos);
1326 } 1326 }
1327 1327
1328 1328
1329 void ParserTraits::AddFormalParameter( 1329 void ParserTraits::AddFormalParameter(
1330 ParserFormalParameters* parameters, 1330 ParserFormalParameters* parameters,
1331 Expression* pattern, Expression* initializer, bool is_rest) { 1331 Expression* pattern, Expression* initializer, bool is_rest) {
1332 bool is_simple = 1332 bool is_simple =
1333 !is_rest && pattern->IsVariableProxy() && initializer == nullptr; 1333 !is_rest && pattern->IsVariableProxy() && initializer == nullptr;
1334 DCHECK(parser_->allow_harmony_destructuring() || 1334 DCHECK(parser_->allow_harmony_destructuring_bind() ||
1335 parser_->allow_harmony_rest_parameters() || 1335 parser_->allow_harmony_rest_parameters() ||
1336 parser_->allow_harmony_default_parameters() || is_simple); 1336 parser_->allow_harmony_default_parameters() || is_simple);
1337 const AstRawString* name = is_simple 1337 const AstRawString* name = is_simple
1338 ? pattern->AsVariableProxy()->raw_name() 1338 ? pattern->AsVariableProxy()->raw_name()
1339 : parser_->ast_value_factory()->empty_string(); 1339 : parser_->ast_value_factory()->empty_string();
1340 parameters->params.Add( 1340 parameters->params.Add(
1341 ParserFormalParameters::Parameter(name, pattern, initializer, is_rest), 1341 ParserFormalParameters::Parameter(name, pattern, initializer, is_rest),
1342 parameters->scope->zone()); 1342 parameters->scope->zone());
1343 } 1343 }
1344 1344
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1383
1384 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1384 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1385 return parser_->ParseDoExpression(ok); 1385 return parser_->ParseDoExpression(ok);
1386 } 1386 }
1387 1387
1388 1388
1389 } // namespace internal 1389 } // namespace internal
1390 } // namespace v8 1390 } // namespace v8
1391 1391
1392 #endif // V8_PARSER_H_ 1392 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698