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

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: properly rebase 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 833
834 static PreParserStatementList NewStatementList(int size, Zone* zone) { 834 static PreParserStatementList NewStatementList(int size, Zone* zone) {
835 return PreParserStatementList(); 835 return PreParserStatementList();
836 } 836 }
837 837
838 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { 838 static PreParserExpressionList NewPropertyList(int size, Zone* zone) {
839 return PreParserExpressionList(); 839 return PreParserExpressionList();
840 } 840 }
841 841
842 static void AddParameterInitializationBlock( 842 static void AddParameterInitializationBlock(
843 const PreParserFormalParameters& parameters, 843 const PreParserFormalParameters& parameters, PreParserStatementList list,
844 PreParserStatementList list, bool* ok) {} 844 bool is_async, bool* ok) {}
845 845
846 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, 846 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count,
847 int* expected_property_count, bool* ok) { 847 int* expected_property_count, bool* ok) {
848 UNREACHABLE(); 848 UNREACHABLE();
849 } 849 }
850 850
851 V8_INLINE PreParserStatementList ParseEagerFunctionBody( 851 V8_INLINE PreParserStatementList ParseEagerFunctionBody(
852 PreParserIdentifier function_name, int pos, 852 PreParserIdentifier function_name, int pos,
853 const PreParserFormalParameters& parameters, FunctionKind kind, 853 const PreParserFormalParameters& parameters, FunctionKind kind,
854 FunctionLiteral::FunctionType function_type, bool* ok); 854 FunctionLiteral::FunctionType function_type, bool* ok);
855 855
856 V8_INLINE void ParseArrowFunctionFormalParameterList( 856 V8_INLINE void ParseArrowFunctionFormalParameterList(
857 PreParserFormalParameters* parameters, 857 PreParserFormalParameters* parameters,
858 PreParserExpression expression, const Scanner::Location& params_loc, 858 PreParserExpression expression, const Scanner::Location& params_loc,
859 Scanner::Location* duplicate_loc, bool* ok); 859 Scanner::Location* duplicate_loc, bool* ok);
860 860
861 void ParseAsyncArrowSingleExpressionBody(
862 PreParserStatementList body, bool accept_IN,
863 Type::ExpressionClassifier* classifier, int pos, bool* ok);
864
861 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); 865 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok);
862 866
863 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} 867 void ReindexLiterals(const PreParserFormalParameters& paramaters) {}
864 868
865 struct TemplateLiteralState {}; 869 struct TemplateLiteralState {};
866 870
867 TemplateLiteralState OpenTemplateLiteral(int pos) { 871 TemplateLiteralState OpenTemplateLiteral(int pos) {
868 return TemplateLiteralState(); 872 return TemplateLiteralState();
869 } 873 }
870 void AddTemplateSpan(TemplateLiteralState*, bool) {} 874 void AddTemplateSpan(TemplateLiteralState*, bool) {}
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 const PreParserFormalParameters& parameters, FunctionKind kind, 1240 const PreParserFormalParameters& parameters, FunctionKind kind,
1237 FunctionLiteral::FunctionType function_type, bool* ok) { 1241 FunctionLiteral::FunctionType function_type, bool* ok) {
1238 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1242 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1239 kind, function_type, ok); 1243 kind, function_type, ok);
1240 } 1244 }
1241 1245
1242 } // namespace internal 1246 } // namespace internal
1243 } // namespace v8 1247 } // namespace v8
1244 1248
1245 #endif // V8_PARSING_PREPARSER_H 1249 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698