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 92ae0980d5ab0db3af00c9e56085a9aa1fba8f3e..1d0ddecb5f7c19bd5ed45e028943ceb5dcf06ece 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -770,12 +770,14 @@ void FullCodeGenerator::VisitVariableDeclaration( |
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) { |
@@ -817,7 +819,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. |
@@ -875,7 +879,8 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
flags = x10; |
__ Mov(flags, Smi::FromInt(DeclareGlobalsFlags())); |
} |
- __ Push(x11, flags); |
+ __ EmitLoadTypeFeedbackVector(x12); |
+ __ Push(x11, flags, x12); |
__ CallRuntime(Runtime::kDeclareGlobals); |
// Return value is ignored. |
} |