Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 679dd48f92f3ac78fea4f9fabdb6fef496b2b904..32daef883f20c9f9212a463b10d9c2e299f7251d 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -933,6 +933,7 @@ void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) { |
DCHECK(!slot.IsInvalid()); |
globals()->push_back(handle(Smi::FromInt(slot.ToInt()), isolate())); |
globals()->push_back(isolate()->factory()->undefined_value()); |
+ globals()->push_back(isolate()->factory()->undefined_value()); |
break; |
} |
case VariableLocation::PARAMETER: |
@@ -958,6 +959,12 @@ void AstGraphBuilder::VisitFunctionDeclaration(FunctionDeclaration* decl) { |
FeedbackVectorSlot slot = decl->proxy()->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals()->push_back(handle(Smi::FromInt(slot.ToInt()), isolate())); |
+ |
+ // We need the slot where the literals array lives, too. |
+ slot = decl->fun()->LiteralFeedbackSlot(); |
+ DCHECK(!slot.IsInvalid()); |
+ globals()->push_back(handle(Smi::FromInt(slot.ToInt()), isolate())); |
+ |
globals()->push_back(function); |
break; |
} |