| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 } | 748 } |
| 749 ZoneList<const v8::internal::AstRawString*>* NewFormalParameterList( | 749 ZoneList<const v8::internal::AstRawString*>* NewFormalParameterList( |
| 750 int size, Zone* zone) { | 750 int size, Zone* zone) { |
| 751 return new (zone) ZoneList<const v8::internal::AstRawString*>(size, zone); | 751 return new (zone) ZoneList<const v8::internal::AstRawString*>(size, zone); |
| 752 } | 752 } |
| 753 V8_INLINE Scope* NewScope(Scope* parent_scope, ScopeType scope_type, | 753 V8_INLINE Scope* NewScope(Scope* parent_scope, ScopeType scope_type, |
| 754 FunctionKind kind = kNormalFunction); | 754 FunctionKind kind = kNormalFunction); |
| 755 | 755 |
| 756 // Utility functions | 756 // Utility functions |
| 757 int DeclareArrowParametersFromExpression(Expression* expression, Scope* scope, | 757 int DeclareArrowParametersFromExpression(Expression* expression, Scope* scope, |
| 758 Scanner::Location* undefined_loc, | 758 FormalParameterErrorLocations* locs, |
| 759 Scanner::Location* dupe_loc, | |
| 760 bool* ok); | 759 bool* ok); |
| 761 | 760 |
| 762 // Temporary glue; these functions will move to ParserBase. | 761 // Temporary glue; these functions will move to ParserBase. |
| 763 Expression* ParseV8Intrinsic(bool* ok); | 762 Expression* ParseV8Intrinsic(bool* ok); |
| 764 FunctionLiteral* ParseFunctionLiteral( | 763 FunctionLiteral* ParseFunctionLiteral( |
| 765 const AstRawString* name, Scanner::Location function_name_location, | 764 const AstRawString* name, Scanner::Location function_name_location, |
| 766 bool name_is_strict_reserved, FunctionKind kind, | 765 bool name_is_strict_reserved, FunctionKind kind, |
| 767 int function_token_position, FunctionLiteral::FunctionType type, | 766 int function_token_position, FunctionLiteral::FunctionType type, |
| 768 FunctionLiteral::ArityRestriction arity_restriction, bool* ok); | 767 FunctionLiteral::ArityRestriction arity_restriction, bool* ok); |
| 769 V8_INLINE void SkipLazyFunctionBody(const AstRawString* name, | 768 V8_INLINE void SkipLazyFunctionBody(const AstRawString* name, |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 } | 1170 } |
| 1172 | 1171 |
| 1173 | 1172 |
| 1174 Expression* ParserTraits::SpreadCallNew( | 1173 Expression* ParserTraits::SpreadCallNew( |
| 1175 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1174 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
| 1176 return parser_->SpreadCallNew(function, args, pos); | 1175 return parser_->SpreadCallNew(function, args, pos); |
| 1177 } | 1176 } |
| 1178 } } // namespace v8::internal | 1177 } } // namespace v8::internal |
| 1179 | 1178 |
| 1180 #endif // V8_PARSER_H_ | 1179 #endif // V8_PARSER_H_ |
| OLD | NEW |