Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 0720c3d083543b0dfa83930f8a0981a567546156..77861eb7d91a68a4f4a9b12edfec5fbb6d4301cf 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -745,6 +745,7 @@ void FullCodeGenerator::VisitVariableDeclaration( |
switch (variable->location()) { |
case VariableLocation::UNALLOCATED: { |
DCHECK(!variable->binding_needs_init()); |
+ globals_->Add(variable->name(), zone()); |
FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
@@ -793,6 +794,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
Variable* variable = proxy->var(); |
switch (variable->location()) { |
case VariableLocation::UNALLOCATED: { |
+ globals_->Add(variable->name(), zone()); |
FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
DCHECK(!slot.IsInvalid()); |
globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |