| Index: src/ast/ast-numbering.cc
|
| diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
|
| index 6c48a0740ff97f868846fd99166428d92058b039..5fba8806cdfff5d66b56d211fb2f272bfac7f016 100644
|
| --- a/src/ast/ast-numbering.cc
|
| +++ b/src/ast/ast-numbering.cc
|
| @@ -220,7 +220,6 @@ void AstNumberingVisitor::VisitYield(Yield* node) {
|
| yield_count_++;
|
| IncrementNodeCount();
|
| node->set_base_id(ReserveIdRange(Yield::num_ids()));
|
| - Visit(node->generator_object());
|
| Visit(node->expression());
|
| }
|
|
|
| @@ -422,6 +421,11 @@ void AstNumberingVisitor::VisitGetIterator(GetIterator* node) {
|
| ReserveFeedbackSlots(node);
|
| }
|
|
|
| +void AstNumberingVisitor::VisitInternalVariable(InternalVariable* node) {
|
| + IncrementNodeCount();
|
| + DisableFullCodegenAndCrankshaft(kNoReason);
|
| +}
|
| +
|
| void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
|
| IncrementNodeCount();
|
| DisableSelfOptimization();
|
| @@ -641,7 +645,28 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
|
| 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;
|
| + }
|
| +
|
| VisitDeclarations(scope->declarations());
|
| + if (node->parameter_init_block() != nullptr) {
|
| + DisableFullCodegenAndCrankshaft(kNonSimpleParameters);
|
| + VisitBlock(node->parameter_init_block());
|
| + }
|
| VisitStatements(node->body());
|
|
|
| node->set_ast_properties(&properties_);
|
|
|