Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index b19a372a38e735845cf26b9c7724940812ebfcf6..8758ea3637170890fa7f0772b7b87ea4d99a20bd 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -773,12 +773,14 @@ void FullCodeGenerator::VisitVariableDeclaration( |
bool hole_init = mode == LET || mode == CONST; |
switch (variable->location()) { |
case VariableLocation::GLOBAL: |
- case VariableLocation::UNALLOCATED: |
+ 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()); |
globals_->Add(isolate()->factory()->undefined_value(), zone()); |
break; |
- |
+ } |
case VariableLocation::PARAMETER: |
case VariableLocation::LOCAL: |
if (hole_init) { |
@@ -820,7 +822,9 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
switch (variable->location()) { |
case VariableLocation::GLOBAL: |
case VariableLocation::UNALLOCATED: { |
- globals_->Add(variable->name(), zone()); |
+ FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
+ 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. |
@@ -874,7 +878,8 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
// Call the runtime to declare the globals. |
__ mov(r1, Operand(pairs)); |
__ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); |
- __ Push(r1, r0); |
+ __ EmitLoadTypeFeedbackVector(r2); |
+ __ Push(r1, r0, r2); |
__ CallRuntime(Runtime::kDeclareGlobals); |
// Return value is ignored. |
} |