Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index f5b195ddef82aaf8c9b783a457b1e3805304c038..b0dd7ab06e77e8dd729e3a4ac6fbabebe36e39fb 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -11833,6 +11833,7 @@ void HOptimizedGraphBuilder::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()); |
@@ -11871,6 +11872,7 @@ void HOptimizedGraphBuilder::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()); |