| Index: src/ast/ast-numbering.cc
|
| diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
|
| index 001911fcef78776f979d51bb6faf346f67b4c2b1..689148d62b156fcb348e776c083ce503747b5c99 100644
|
| --- a/src/ast/ast-numbering.cc
|
| +++ b/src/ast/ast-numbering.cc
|
| @@ -664,15 +664,42 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
|
|
|
| if (IsResumableFunction(node->kind())) {
|
| DisableFullCodegenAndCrankshaft(kGenerator);
|
| +
|
| + if (IsAsyncFunction(node->kind())) {
|
| + // Set initial catch_prediction to HandlerTable::ASYNC_AWAIT for the
|
| + // wrapper try/catch block not present in the AST.
|
| + catch_prediction_ = HandlerTable::ASYNC_AWAIT;
|
| + }
|
| }
|
|
|
| if (IsClassConstructor(node->kind())) {
|
| DisableFullCodegenAndCrankshaft(kClassConstructorFunction);
|
| }
|
|
|
| + if (scope->is_function_scope()) {
|
| + Variable* function_var = scope->function_var();
|
| + if (function_var != nullptr && !function_var->IsUnallocated()) {
|
| + // Initialization of local function-named variable is no longer part of
|
| + // the AST, and this initialization is not handled in full-codegen or
|
| + // crankshaft.
|
| + DisableFullCodegenAndCrankshaft(kNoReason);
|
| + }
|
| + }
|
| +
|
| + if (IsGeneratorFunction(node->kind()) || scope->is_module_scope()) {
|
| + // Generator functions and Modules have an initial yield which is not
|
| + // included in the AST.
|
| + DCHECK_EQ(0, yield_count_);
|
| + yield_count_ = 1;
|
| + }
|
| +
|
| LanguageModeScope language_mode_scope(this, node->language_mode());
|
|
|
| VisitDeclarations(scope->declarations());
|
| + if (node->parameter_init_block() != nullptr) {
|
| + DisableFullCodegenAndCrankshaft(kNonSimpleParameters);
|
| + VisitBlock(node->parameter_init_block());
|
| + }
|
| VisitStatements(node->body());
|
|
|
| node->set_ast_properties(&properties_);
|
|
|