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

Side by Side Diff: src/parsing/parser.h

Issue 1841093002: Add optional types to function/method declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-1817353007-typ-mod
Patch Set: Created 4 years, 8 months 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
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_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 V8_INLINE DoExpression* ParseDoExpression(bool* ok); 599 V8_INLINE DoExpression* ParseDoExpression(bool* ok);
600 600
601 void ReindexLiterals(const ParserFormalParameters& parameters); 601 void ReindexLiterals(const ParserFormalParameters& parameters);
602 602
603 // Temporary glue; these functions will move to ParserBase. 603 // Temporary glue; these functions will move to ParserBase.
604 Expression* ParseV8Intrinsic(bool* ok); 604 Expression* ParseV8Intrinsic(bool* ok);
605 FunctionLiteral* ParseFunctionLiteral( 605 FunctionLiteral* ParseFunctionLiteral(
606 const AstRawString* name, Scanner::Location function_name_location, 606 const AstRawString* name, Scanner::Location function_name_location,
607 FunctionNameValidity function_name_validity, FunctionKind kind, 607 FunctionNameValidity function_name_validity, FunctionKind kind,
608 int function_token_position, FunctionLiteral::FunctionType type, 608 int function_token_position, FunctionLiteral::FunctionType type,
609 LanguageMode language_mode, bool* ok); 609 LanguageMode language_mode, typesystem::TypeFlags type_flags, bool* ok);
610 V8_INLINE void SkipLazyFunctionBody( 610 V8_INLINE void SkipLazyFunctionBody(
611 int* materialized_literal_count, int* expected_property_count, bool* ok, 611 int* materialized_literal_count, int* expected_property_count, bool* ok,
612 Scanner::BookmarkScope* bookmark = nullptr); 612 Scanner::BookmarkScope* bookmark = nullptr);
613 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( 613 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody(
614 const AstRawString* name, int pos, 614 const AstRawString* name, int pos,
615 const ParserFormalParameters& parameters, FunctionKind kind, 615 const ParserFormalParameters& parameters, FunctionKind kind,
616 FunctionLiteral::FunctionType function_type, bool* ok); 616 FunctionLiteral::FunctionType function_type, bool* ok);
617 617
618 ClassLiteral* ParseClassLiteral(const AstRawString* name, 618 ClassLiteral* ParseClassLiteral(const AstRawString* name,
619 Scanner::Location class_name_location, 619 Scanner::Location class_name_location,
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 Scope* inner_scope, VariableMode mode, 990 Scope* inner_scope, VariableMode mode,
991 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, 991 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init,
992 Expression* cond, Statement* next, Statement* body, bool* ok); 992 Expression* cond, Statement* next, Statement* body, bool* ok);
993 993
994 void RewriteDoExpression(Expression* expr, bool* ok); 994 void RewriteDoExpression(Expression* expr, bool* ok);
995 995
996 FunctionLiteral* ParseFunctionLiteral( 996 FunctionLiteral* ParseFunctionLiteral(
997 const AstRawString* name, Scanner::Location function_name_location, 997 const AstRawString* name, Scanner::Location function_name_location,
998 FunctionNameValidity function_name_validity, FunctionKind kind, 998 FunctionNameValidity function_name_validity, FunctionKind kind,
999 int function_token_position, FunctionLiteral::FunctionType type, 999 int function_token_position, FunctionLiteral::FunctionType type,
1000 LanguageMode language_mode, bool* ok); 1000 LanguageMode language_mode, typesystem::TypeFlags type_flags, bool* ok);
1001 1001
1002 1002
1003 ClassLiteral* ParseClassLiteral(const AstRawString* name, 1003 ClassLiteral* ParseClassLiteral(const AstRawString* name,
1004 Scanner::Location class_name_location, 1004 Scanner::Location class_name_location,
1005 bool name_is_strict_reserved, int pos, 1005 bool name_is_strict_reserved, int pos,
1006 bool* ok); 1006 bool* ok);
1007 1007
1008 // Magical syntax support. 1008 // Magical syntax support.
1009 Expression* ParseV8Intrinsic(bool* ok); 1009 Expression* ParseV8Intrinsic(bool* ok);
1010 1010
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 1320
1321 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1321 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1322 return parser_->ParseDoExpression(ok); 1322 return parser_->ParseDoExpression(ok);
1323 } 1323 }
1324 1324
1325 1325
1326 } // namespace internal 1326 } // namespace internal
1327 } // namespace v8 1327 } // namespace v8
1328 1328
1329 #endif // V8_PARSING_PARSER_H_ 1329 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698