Index: src/full-codegen/s390/full-codegen-s390.cc |
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc |
index 90b38ac3c867a24dc9dfa23c2799943581d94b99..c1d4b5ba702bb2b5ef8b5baf2433d64df2fe570b 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -713,12 +713,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) { |
@@ -759,7 +761,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. |
@@ -807,7 +811,8 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
// Call the runtime to declare the globals. |
__ mov(r3, Operand(pairs)); |
__ LoadSmiLiteral(r2, Smi::FromInt(DeclareGlobalsFlags())); |
- __ Push(r3, r2); |
+ __ EmitLoadTypeFeedbackVector(r0); |
+ __ Push(r3, r2, r0); |
__ CallRuntime(Runtime::kDeclareGlobals); |
// Return value is ignored. |
} |