| OLD | NEW | 
|---|
| 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 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3924   } | 3924   } | 
| 3925 | 3925 | 
| 3926   AddFormalParameter(parameters, expr, initializer, is_rest); | 3926   AddFormalParameter(parameters, expr, initializer, is_rest); | 
| 3927 } | 3927 } | 
| 3928 | 3928 | 
| 3929 | 3929 | 
| 3930 void ParserTraits::ParseArrowFunctionFormalParameterList( | 3930 void ParserTraits::ParseArrowFunctionFormalParameterList( | 
| 3931     ParserFormalParameters* parameters, Expression* expr, | 3931     ParserFormalParameters* parameters, Expression* expr, | 
| 3932     const Scanner::Location& params_loc, | 3932     const Scanner::Location& params_loc, | 
| 3933     Scanner::Location* duplicate_loc, bool* ok) { | 3933     Scanner::Location* duplicate_loc, bool* ok) { | 
|  | 3934   if (expr->IsEmptyParentheses()) return; | 
|  | 3935 | 
| 3934   ParseArrowFunctionFormalParameters(parameters, expr, params_loc, | 3936   ParseArrowFunctionFormalParameters(parameters, expr, params_loc, | 
| 3935                                      duplicate_loc, ok); | 3937                                      duplicate_loc, ok); | 
| 3936   if (!*ok) return; | 3938   if (!*ok) return; | 
| 3937 | 3939 | 
| 3938   for (int i = 0; i < parameters->Arity(); ++i) { | 3940   for (int i = 0; i < parameters->Arity(); ++i) { | 
| 3939     auto parameter = parameters->at(i); | 3941     auto parameter = parameters->at(i); | 
| 3940     ExpressionClassifier classifier; | 3942     ExpressionClassifier classifier; | 
| 3941     DeclareFormalParameter( | 3943     DeclareFormalParameter( | 
| 3942         parameters->scope, parameter, parameters->is_simple, &classifier); | 3944         parameters->scope, parameter, parameters->is_simple, &classifier); | 
| 3943     if (!duplicate_loc->IsValid()) { | 3945     if (!duplicate_loc->IsValid()) { | 
| (...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6042 Expression* Parser::SpreadCallNew(Expression* function, | 6044 Expression* Parser::SpreadCallNew(Expression* function, | 
| 6043                                   ZoneList<v8::internal::Expression*>* args, | 6045                                   ZoneList<v8::internal::Expression*>* args, | 
| 6044                                   int pos) { | 6046                                   int pos) { | 
| 6045   args->InsertAt(0, function, zone()); | 6047   args->InsertAt(0, function, zone()); | 
| 6046 | 6048 | 
| 6047   return factory()->NewCallRuntime( | 6049   return factory()->NewCallRuntime( | 
| 6048       ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6050       ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 
| 6049 } | 6051 } | 
| 6050 }  // namespace internal | 6052 }  // namespace internal | 
| 6051 }  // namespace v8 | 6053 }  // namespace v8 | 
| OLD | NEW | 
|---|