| 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 3951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3962 } | 3962 } |
| 3963 | 3963 |
| 3964 AddFormalParameter(parameters, expr, initializer, is_rest); | 3964 AddFormalParameter(parameters, expr, initializer, is_rest); |
| 3965 } | 3965 } |
| 3966 | 3966 |
| 3967 | 3967 |
| 3968 void ParserTraits::ParseArrowFunctionFormalParameterList( | 3968 void ParserTraits::ParseArrowFunctionFormalParameterList( |
| 3969 ParserFormalParameters* parameters, Expression* expr, | 3969 ParserFormalParameters* parameters, Expression* expr, |
| 3970 const Scanner::Location& params_loc, | 3970 const Scanner::Location& params_loc, |
| 3971 Scanner::Location* duplicate_loc, bool* ok) { | 3971 Scanner::Location* duplicate_loc, bool* ok) { |
| 3972 if (expr->IsEmptyParentheses()) return; |
| 3973 |
| 3972 ParseArrowFunctionFormalParameters(parameters, expr, params_loc, | 3974 ParseArrowFunctionFormalParameters(parameters, expr, params_loc, |
| 3973 duplicate_loc, ok); | 3975 duplicate_loc, ok); |
| 3974 if (!*ok) return; | 3976 if (!*ok) return; |
| 3975 | 3977 |
| 3976 for (int i = 0; i < parameters->Arity(); ++i) { | 3978 for (int i = 0; i < parameters->Arity(); ++i) { |
| 3977 auto parameter = parameters->at(i); | 3979 auto parameter = parameters->at(i); |
| 3978 ExpressionClassifier classifier; | 3980 ExpressionClassifier classifier; |
| 3979 DeclareFormalParameter( | 3981 DeclareFormalParameter( |
| 3980 parameters->scope, parameter, parameters->is_simple, &classifier); | 3982 parameters->scope, parameter, parameters->is_simple, &classifier); |
| 3981 if (!duplicate_loc->IsValid()) { | 3983 if (!duplicate_loc->IsValid()) { |
| (...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6107 Expression* Parser::SpreadCallNew(Expression* function, | 6109 Expression* Parser::SpreadCallNew(Expression* function, |
| 6108 ZoneList<v8::internal::Expression*>* args, | 6110 ZoneList<v8::internal::Expression*>* args, |
| 6109 int pos) { | 6111 int pos) { |
| 6110 args->InsertAt(0, function, zone()); | 6112 args->InsertAt(0, function, zone()); |
| 6111 | 6113 |
| 6112 return factory()->NewCallRuntime( | 6114 return factory()->NewCallRuntime( |
| 6113 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6115 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 6114 } | 6116 } |
| 6115 } // namespace internal | 6117 } // namespace internal |
| 6116 } // namespace v8 | 6118 } // namespace v8 |
| OLD | NEW |