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

Unified Diff: src/parsing/parser.h

Issue 2664083002: [ignition] desugar async functions/generators/modules in BytecodeGenerator
Patch Set: get rid of lambdas, for better or worse.. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 934068d8f51e1787dadaf44e9964829bc61d0b7d..d95144c216a0e4e3988d84c58ddfb8e09452146d 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -344,10 +344,9 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
void ParseAndRewriteGeneratorFunctionBody(int pos, FunctionKind kind,
ZoneList<Statement*>* body,
bool* ok);
- void CreateFunctionNameAssignment(const AstRawString* function_name, int pos,
- FunctionLiteral::FunctionType function_type,
- DeclarationScope* function_scope,
- ZoneList<Statement*>* result, int index);
+ void CreateFunctionNameVariable(const AstRawString* function_name,
+ FunctionLiteral::FunctionType function_type,
+ DeclarationScope* function_scope);
Statement* DeclareFunction(const AstRawString* variable_name,
FunctionLiteral* function, VariableMode mode,
@@ -549,8 +548,9 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
const AstRawString* function_name, int pos, FunctionKind kind,
FunctionLiteral::FunctionType function_type,
DeclarationScope* function_scope, int* num_parameters,
- int* function_length, bool* has_duplicate_parameters,
- int* materialized_literal_count, int* expected_property_count, bool* ok);
+ Block** parameter_init_block, int* function_length,
+ bool* has_duplicate_parameters, int* materialized_literal_count,
+ int* expected_property_count, bool* ok);
void ThrowPendingError(Isolate* isolate, Handle<Script> script);
@@ -627,10 +627,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
friend class InitializerRewriter;
void RewriteParameterInitializer(Expression* expr, Scope* scope);
- Expression* BuildInitialYield(int pos, FunctionKind kind);
- Assignment* BuildCreateJSGeneratorObject(int pos, FunctionKind kind);
Expression* BuildResolvePromise(Expression* value, int pos);
- Expression* BuildRejectPromise(Expression* value, int pos);
Variable* PromiseVariable();
// Generic AST generator for throwing errors from compiled code.
@@ -656,7 +653,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body,
FunctionKind kind, int pos);
V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body,
- Block* block,
Expression* return_value, bool* ok);
Expression* RewriteYieldStar(Expression* generator, Expression* expression,
@@ -1036,18 +1032,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
factory()->NewThrow(exception, pos), pos);
}
- V8_INLINE void AddParameterInitializationBlock(
- const ParserFormalParameters& parameters, ZoneList<Statement*>* body,
- bool is_async, bool* ok) {
- if (parameters.is_simple) return;
- auto* init_block = BuildParameterInitializationBlock(parameters, ok);
- if (!*ok) return;
- if (is_async) {
- init_block = BuildRejectPromiseOnException(init_block);
- }
- if (init_block != nullptr) body->Add(init_block, zone());
- }
-
V8_INLINE void AddFormalParameter(ParserFormalParameters* parameters,
Expression* pattern,
Expression* initializer,

Powered by Google App Engine
This is Rietveld 408576698