| Index: src/full-codegen/mips/full-codegen-mips.cc
|
| diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
|
| index 0c84aabf2eb7494382c6b4454f7543dcd2f3208b..3f796b6c05e379f838446dc1f96254be16c583da 100644
|
| --- a/src/full-codegen/mips/full-codegen-mips.cc
|
| +++ b/src/full-codegen/mips/full-codegen-mips.cc
|
| @@ -770,12 +770,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) {
|
| @@ -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.
|
| @@ -871,7 +875,8 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
|
| // Call the runtime to declare the globals.
|
| __ li(a1, Operand(pairs));
|
| __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
|
| - __ Push(a1, a0);
|
| + __ EmitLoadTypeFeedbackVector(a2);
|
| + __ Push(a1, a0, a2);
|
| __ CallRuntime(Runtime::kDeclareGlobals);
|
| // Return value is ignored.
|
| }
|
|
|