Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index ae1fab14b97a52fedcfaec945798c0cf65278358..1758e024cfcc8603aa273d3fe291240fe28c4a53 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -756,6 +756,7 @@ void FullCodeGenerator::VisitVariableDeclaration( |
DCHECK(!slot.IsInvalid()); |
globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
globals_->Add(isolate()->factory()->undefined_value(), zone()); |
+ globals_->Add(isolate()->factory()->undefined_value(), zone()); |
break; |
} |
case VariableLocation::PARAMETER: |
@@ -795,6 +796,12 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
+ |
+ // We need the slot where the literals array lives, too. |
+ slot = declaration->fun()->LiteralFeedbackSlot(); |
+ DCHECK(!slot.IsInvalid()); |
+ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
+ |
Handle<SharedFunctionInfo> function = |
Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
// Check for stack overflow exception. |