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

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

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: fix some nits Created 4 years, 7 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
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 853
854 static PreParserStatementList NewStatementList(int size, Zone* zone) { 854 static PreParserStatementList NewStatementList(int size, Zone* zone) {
855 return PreParserStatementList(); 855 return PreParserStatementList();
856 } 856 }
857 857
858 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { 858 static PreParserExpressionList NewPropertyList(int size, Zone* zone) {
859 return PreParserExpressionList(); 859 return PreParserExpressionList();
860 } 860 }
861 861
862 static void AddParameterInitializationBlock( 862 static void AddParameterInitializationBlock(
863 const PreParserFormalParameters& parameters, 863 const PreParserFormalParameters& parameters, PreParserStatementList list,
864 PreParserStatementList list, bool* ok) {} 864 bool is_async, bool* ok) {}
865 865
866 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, 866 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count,
867 int* expected_property_count, bool* ok) { 867 int* expected_property_count, bool* ok) {
868 UNREACHABLE(); 868 UNREACHABLE();
869 } 869 }
870 870
871 V8_INLINE PreParserStatementList ParseEagerFunctionBody( 871 V8_INLINE PreParserStatementList ParseEagerFunctionBody(
872 PreParserIdentifier function_name, int pos, 872 PreParserIdentifier function_name, int pos,
873 const PreParserFormalParameters& parameters, FunctionKind kind, 873 const PreParserFormalParameters& parameters, FunctionKind kind,
874 FunctionLiteral::FunctionType function_type, bool* ok); 874 FunctionLiteral::FunctionType function_type, bool* ok);
875 875
876 V8_INLINE void ParseArrowFunctionFormalParameterList( 876 V8_INLINE void ParseArrowFunctionFormalParameterList(
877 PreParserFormalParameters* parameters, 877 PreParserFormalParameters* parameters,
878 PreParserExpression expression, const Scanner::Location& params_loc, 878 PreParserExpression expression, const Scanner::Location& params_loc,
879 Scanner::Location* duplicate_loc, bool* ok); 879 Scanner::Location* duplicate_loc, bool* ok);
880 880
881 void ParseAsyncArrowSingleExpressionBody(
882 PreParserStatementList body, bool accept_IN,
883 Type::ExpressionClassifier* classifier, int pos, bool* ok);
884
881 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); 885 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok);
882 886
883 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} 887 void ReindexLiterals(const PreParserFormalParameters& paramaters) {}
884 888
885 struct TemplateLiteralState {}; 889 struct TemplateLiteralState {};
886 890
887 TemplateLiteralState OpenTemplateLiteral(int pos) { 891 TemplateLiteralState OpenTemplateLiteral(int pos) {
888 return TemplateLiteralState(); 892 return TemplateLiteralState();
889 } 893 }
890 void AddTemplateSpan(TemplateLiteralState*, bool) {} 894 void AddTemplateSpan(TemplateLiteralState*, bool) {}
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 const PreParserFormalParameters& parameters, FunctionKind kind, 1261 const PreParserFormalParameters& parameters, FunctionKind kind,
1258 FunctionLiteral::FunctionType function_type, bool* ok) { 1262 FunctionLiteral::FunctionType function_type, bool* ok) {
1259 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1263 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1260 kind, function_type, ok); 1264 kind, function_type, ok);
1261 } 1265 }
1262 1266
1263 } // namespace internal 1267 } // namespace internal
1264 } // namespace v8 1268 } // namespace v8
1265 1269
1266 #endif // V8_PARSING_PREPARSER_H 1270 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698