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

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 more bugs 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
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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 844
845 static PreParserStatementList NewStatementList(int size, Zone* zone) { 845 static PreParserStatementList NewStatementList(int size, Zone* zone) {
846 return PreParserStatementList(); 846 return PreParserStatementList();
847 } 847 }
848 848
849 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { 849 static PreParserExpressionList NewPropertyList(int size, Zone* zone) {
850 return PreParserExpressionList(); 850 return PreParserExpressionList();
851 } 851 }
852 852
853 static void AddParameterInitializationBlock( 853 static void AddParameterInitializationBlock(
854 const PreParserFormalParameters& parameters, 854 const PreParserFormalParameters& parameters, PreParserStatementList list,
855 PreParserStatementList list, bool* ok) {} 855 bool is_async, bool* ok) {}
856 856
857 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, 857 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count,
858 int* expected_property_count, bool* ok) { 858 int* expected_property_count, bool* ok) {
859 UNREACHABLE(); 859 UNREACHABLE();
860 } 860 }
861 861
862 V8_INLINE PreParserStatementList ParseEagerFunctionBody( 862 V8_INLINE PreParserStatementList ParseEagerFunctionBody(
863 PreParserIdentifier function_name, int pos, 863 PreParserIdentifier function_name, int pos,
864 const PreParserFormalParameters& parameters, FunctionKind kind, 864 const PreParserFormalParameters& parameters, FunctionKind kind,
865 FunctionLiteral::FunctionType function_type, bool* ok); 865 FunctionLiteral::FunctionType function_type, bool* ok);
866 866
867 V8_INLINE void ParseArrowFunctionFormalParameterList( 867 V8_INLINE void ParseArrowFunctionFormalParameterList(
868 PreParserFormalParameters* parameters, 868 PreParserFormalParameters* parameters,
869 PreParserExpression expression, const Scanner::Location& params_loc, 869 PreParserExpression expression, const Scanner::Location& params_loc,
870 Scanner::Location* duplicate_loc, bool* ok); 870 Scanner::Location* duplicate_loc, bool* ok);
871 871
872 void ParseAsyncArrowSingleExpressionBody(
873 PreParserStatementList body, bool accept_IN,
874 Type::ExpressionClassifier* classifier, int pos, bool* ok);
875
872 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); 876 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok);
873 877
874 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} 878 void ReindexLiterals(const PreParserFormalParameters& paramaters) {}
875 879
876 struct TemplateLiteralState {}; 880 struct TemplateLiteralState {};
877 881
878 TemplateLiteralState OpenTemplateLiteral(int pos) { 882 TemplateLiteralState OpenTemplateLiteral(int pos) {
879 return TemplateLiteralState(); 883 return TemplateLiteralState();
880 } 884 }
881 void AddTemplateSpan(TemplateLiteralState*, bool) {} 885 void AddTemplateSpan(TemplateLiteralState*, bool) {}
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 const PreParserFormalParameters& parameters, FunctionKind kind, 1251 const PreParserFormalParameters& parameters, FunctionKind kind,
1248 FunctionLiteral::FunctionType function_type, bool* ok) { 1252 FunctionLiteral::FunctionType function_type, bool* ok) {
1249 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1253 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1250 kind, function_type, ok); 1254 kind, function_type, ok);
1251 } 1255 }
1252 1256
1253 } // namespace internal 1257 } // namespace internal
1254 } // namespace v8 1258 } // namespace v8
1255 1259
1256 #endif // V8_PARSING_PREPARSER_H 1260 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698