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 #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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 // TODO(sigurds) Mark every parameter as maybe assigned. This is a | 753 // TODO(sigurds) Mark every parameter as maybe assigned. This is a |
754 // conservative approximation necessary to account for parameters | 754 // conservative approximation necessary to account for parameters |
755 // that are assigned via the arguments array. | 755 // that are assigned via the arguments array. |
756 var->set_maybe_assigned(); | 756 var->set_maybe_assigned(); |
757 } | 757 } |
758 return is_duplicate; | 758 return is_duplicate; |
759 } | 759 } |
760 | 760 |
761 void DeclareArrowFunctionParameters(Scope* scope, Expression* expr, | 761 void DeclareArrowFunctionParameters(Scope* scope, Expression* expr, |
762 const Scanner::Location& params_loc, | 762 const Scanner::Location& params_loc, |
763 FormalParameterErrorLocations* error_locs, | 763 Scanner::Location* duplicate_loc, |
764 bool* ok); | 764 bool* ok); |
765 void ParseArrowFunctionFormalParameters( | 765 void ParseArrowFunctionFormalParameters(Scope* scope, Expression* params, |
766 Scope* scope, Expression* params, const Scanner::Location& params_loc, | 766 const Scanner::Location& params_loc, |
767 FormalParameterErrorLocations* error_locs, bool* is_rest, bool* ok); | 767 bool* is_rest, |
| 768 Scanner::Location* duplicate_loc, |
| 769 bool* ok); |
768 | 770 |
769 // Temporary glue; these functions will move to ParserBase. | 771 // Temporary glue; these functions will move to ParserBase. |
770 Expression* ParseV8Intrinsic(bool* ok); | 772 Expression* ParseV8Intrinsic(bool* ok); |
771 FunctionLiteral* ParseFunctionLiteral( | 773 FunctionLiteral* ParseFunctionLiteral( |
772 const AstRawString* name, Scanner::Location function_name_location, | 774 const AstRawString* name, Scanner::Location function_name_location, |
773 bool name_is_strict_reserved, FunctionKind kind, | 775 bool name_is_strict_reserved, FunctionKind kind, |
774 int function_token_position, FunctionLiteral::FunctionType type, | 776 int function_token_position, FunctionLiteral::FunctionType type, |
775 FunctionLiteral::ArityRestriction arity_restriction, bool* ok); | 777 FunctionLiteral::ArityRestriction arity_restriction, bool* ok); |
776 V8_INLINE void SkipLazyFunctionBody( | 778 V8_INLINE void SkipLazyFunctionBody( |
777 int* materialized_literal_count, int* expected_property_count, bool* ok, | 779 int* materialized_literal_count, int* expected_property_count, bool* ok, |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 } | 1181 } |
1180 | 1182 |
1181 | 1183 |
1182 Expression* ParserTraits::SpreadCallNew( | 1184 Expression* ParserTraits::SpreadCallNew( |
1183 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1185 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
1184 return parser_->SpreadCallNew(function, args, pos); | 1186 return parser_->SpreadCallNew(function, args, pos); |
1185 } | 1187 } |
1186 } } // namespace v8::internal | 1188 } } // namespace v8::internal |
1187 | 1189 |
1188 #endif // V8_PARSER_H_ | 1190 #endif // V8_PARSER_H_ |
OLD | NEW |