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

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

Issue 2917263002: Move generator-close on exception from the generator function to the GeneratorResume builtin. (Closed)
Patch Set: Add register allocation scope Created 3 years, 6 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/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 V8_INLINE PreParserStatement RewriteTryStatement( 1069 V8_INLINE PreParserStatement RewriteTryStatement(
1070 PreParserStatement try_block, PreParserStatement catch_block, 1070 PreParserStatement try_block, PreParserStatement catch_block,
1071 PreParserStatement finally_block, const CatchInfo& catch_info, int pos) { 1071 PreParserStatement finally_block, const CatchInfo& catch_info, int pos) {
1072 return PreParserStatement::Default(); 1072 return PreParserStatement::Default();
1073 } 1073 }
1074 1074
1075 V8_INLINE void ParseAndRewriteGeneratorFunctionBody( 1075 V8_INLINE void ParseAndRewriteGeneratorFunctionBody(
1076 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) { 1076 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) {
1077 ParseStatementList(body, Token::RBRACE, ok); 1077 ParseStatementList(body, Token::RBRACE, ok);
1078 } 1078 }
1079 V8_INLINE void ParseAndRewriteAsyncGeneratorFunctionBody(
1080 int pos, FunctionKind kind, PreParserStatementList body, bool* ok) {
1081 ParseStatementList(body, Token::RBRACE, ok);
1082 }
1079 V8_INLINE void CreateFunctionNameAssignment( 1083 V8_INLINE void CreateFunctionNameAssignment(
1080 PreParserIdentifier function_name, int pos, 1084 PreParserIdentifier function_name, int pos,
1081 FunctionLiteral::FunctionType function_type, 1085 FunctionLiteral::FunctionType function_type,
1082 DeclarationScope* function_scope, PreParserStatementList result, 1086 DeclarationScope* function_scope, PreParserStatementList result,
1083 int index) {} 1087 int index) {}
1084 1088
1085 V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body, 1089 V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body,
1086 int pos, bool* ok) { 1090 int pos, bool* ok) {
1087 return PreParserExpression::Default(); 1091 return PreParserExpression::Default();
1088 } 1092 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 Token::Value op, 1286 Token::Value op,
1283 int pos) { 1287 int pos) {
1284 return false; 1288 return false;
1285 } 1289 }
1286 1290
1287 V8_INLINE PreParserExpression BuildUnaryExpression( 1291 V8_INLINE PreParserExpression BuildUnaryExpression(
1288 PreParserExpression expression, Token::Value op, int pos) { 1292 PreParserExpression expression, Token::Value op, int pos) {
1289 return PreParserExpression::Default(); 1293 return PreParserExpression::Default();
1290 } 1294 }
1291 1295
1292 V8_INLINE PreParserExpression BuildIteratorResult(PreParserExpression value,
1293 bool done) {
1294 return PreParserExpression::Default();
1295 }
1296
1297 V8_INLINE PreParserStatement 1296 V8_INLINE PreParserStatement
1298 BuildInitializationBlock(DeclarationParsingResult* parsing_result, 1297 BuildInitializationBlock(DeclarationParsingResult* parsing_result,
1299 ZoneList<const AstRawString*>* names, bool* ok) { 1298 ZoneList<const AstRawString*>* names, bool* ok) {
1300 for (auto declaration : parsing_result->declarations) { 1299 for (auto declaration : parsing_result->declarations) {
1301 DeclareAndInitializeVariables(PreParserStatement::Default(), 1300 DeclareAndInitializeVariables(PreParserStatement::Default(),
1302 &(parsing_result->descriptor), &declaration, 1301 &(parsing_result->descriptor), &declaration,
1303 names, ok); 1302 names, ok);
1304 } 1303 }
1305 return PreParserStatement::Default(); 1304 return PreParserStatement::Default();
1306 } 1305 }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, 1724 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state,
1726 int start, 1725 int start,
1727 PreParserExpression tag) { 1726 PreParserExpression tag) {
1728 return EmptyExpression(); 1727 return EmptyExpression();
1729 } 1728 }
1730 1729
1731 } // namespace internal 1730 } // namespace internal
1732 } // namespace v8 1731 } // namespace v8
1733 1732
1734 #endif // V8_PARSING_PREPARSER_H 1733 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698