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

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: some misc fixes + update the new v8.gyp too 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 828
829 static PreParserStatementList NewStatementList(int size, Zone* zone) { 829 static PreParserStatementList NewStatementList(int size, Zone* zone) {
830 return PreParserStatementList(); 830 return PreParserStatementList();
831 } 831 }
832 832
833 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { 833 static PreParserExpressionList NewPropertyList(int size, Zone* zone) {
834 return PreParserExpressionList(); 834 return PreParserExpressionList();
835 } 835 }
836 836
837 static void AddParameterInitializationBlock( 837 static void AddParameterInitializationBlock(
838 const PreParserFormalParameters& parameters, 838 const PreParserFormalParameters& parameters, PreParserStatementList list,
839 PreParserStatementList list, bool* ok) {} 839 bool is_async, bool* ok) {}
840 840
841 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, 841 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count,
842 int* expected_property_count, bool* ok) { 842 int* expected_property_count, bool* ok) {
843 UNREACHABLE(); 843 UNREACHABLE();
844 } 844 }
845 845
846 V8_INLINE PreParserStatementList ParseEagerFunctionBody( 846 V8_INLINE PreParserStatementList ParseEagerFunctionBody(
847 PreParserIdentifier function_name, int pos, 847 PreParserIdentifier function_name, int pos,
848 const PreParserFormalParameters& parameters, FunctionKind kind, 848 const PreParserFormalParameters& parameters, FunctionKind kind,
849 FunctionLiteral::FunctionType function_type, bool* ok); 849 FunctionLiteral::FunctionType function_type, bool* ok);
850 850
851 V8_INLINE void ParseArrowFunctionFormalParameterList( 851 V8_INLINE void ParseArrowFunctionFormalParameterList(
852 PreParserFormalParameters* parameters, 852 PreParserFormalParameters* parameters,
853 PreParserExpression expression, const Scanner::Location& params_loc, 853 PreParserExpression expression, const Scanner::Location& params_loc,
854 Scanner::Location* duplicate_loc, bool* ok); 854 Scanner::Location* duplicate_loc, bool* ok);
855 855
856 void ParseAsyncArrowSingleExpressionBody(
857 PreParserStatementList body, bool accept_IN,
858 Type::ExpressionClassifier* classifier, int pos, bool* ok);
859
856 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); 860 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok);
857 861
858 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} 862 void ReindexLiterals(const PreParserFormalParameters& paramaters) {}
859 863
860 struct TemplateLiteralState {}; 864 struct TemplateLiteralState {};
861 865
862 TemplateLiteralState OpenTemplateLiteral(int pos) { 866 TemplateLiteralState OpenTemplateLiteral(int pos) {
863 return TemplateLiteralState(); 867 return TemplateLiteralState();
864 } 868 }
865 void AddTemplateSpan(TemplateLiteralState*, bool) {} 869 void AddTemplateSpan(TemplateLiteralState*, bool) {}
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 const PreParserFormalParameters& parameters, FunctionKind kind, 1218 const PreParserFormalParameters& parameters, FunctionKind kind,
1215 FunctionLiteral::FunctionType function_type, bool* ok) { 1219 FunctionLiteral::FunctionType function_type, bool* ok) {
1216 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1220 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1217 kind, function_type, ok); 1221 kind, function_type, ok);
1218 } 1222 }
1219 1223
1220 } // namespace internal 1224 } // namespace internal
1221 } // namespace v8 1225 } // namespace v8
1222 1226
1223 #endif // V8_PARSING_PREPARSER_H 1227 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | test/mjsunit/mjsunit.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698