Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 28e2616ac6ae75b170d2bf760c05b47b7f0f37a8..d55ce85e60f1b1c1dbbfecc95708fdd8a425a753 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -709,6 +709,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: |
@@ -748,6 +749,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. |