| Index: src/full-codegen/mips64/full-codegen-mips64.cc
|
| diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| index 89c5593790dd88498819fbe442f0552a09e1cebc..50b597652a19939e5a1bfb667d4298d1a282ee0c 100644
|
| --- a/src/full-codegen/mips64/full-codegen-mips64.cc
|
| +++ b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| @@ -860,22 +860,21 @@ void FullCodeGenerator::VisitVariableDeclaration(
|
| __ li(a2, Operand(variable->name()));
|
| // Declaration nodes are always introduced in one of four modes.
|
| DCHECK(IsDeclaredVariableMode(mode));
|
| - PropertyAttributes attr =
|
| - IsImmutableVariableMode(mode) ? READ_ONLY : NONE;
|
| - __ li(a1, Operand(Smi::FromInt(attr)));
|
| // Push initial value, if any.
|
| // Note: For variables we must not push an initial value (such as
|
| // 'undefined') because we may have a (legal) redeclaration and we
|
| // must not destroy the current value.
|
| if (hole_init) {
|
| __ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
|
| - __ Push(cp, a2, a1, a0);
|
| } else {
|
| DCHECK(Smi::FromInt(0) == 0);
|
| __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value.
|
| - __ Push(cp, a2, a1, a0);
|
| }
|
| - __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
|
| + __ Push(a2, a0);
|
| + __ CallRuntime(IsImmutableVariableMode(mode)
|
| + ? Runtime::kDeclareReadOnlyLookupSlot
|
| + : Runtime::kDeclareLookupSlot,
|
| + 2);
|
| break;
|
| }
|
| }
|
| @@ -928,11 +927,10 @@ void FullCodeGenerator::VisitFunctionDeclaration(
|
| case VariableLocation::LOOKUP: {
|
| Comment cmnt(masm_, "[ FunctionDeclaration");
|
| __ li(a2, Operand(variable->name()));
|
| - __ li(a1, Operand(Smi::FromInt(NONE)));
|
| - __ Push(cp, a2, a1);
|
| + __ Push(a2);
|
| // Push initial value for function declaration.
|
| VisitForStackValue(declaration->fun());
|
| - __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
|
| + __ CallRuntime(Runtime::kDeclareLookupSlot, 2);
|
| break;
|
| }
|
| }
|
| @@ -941,11 +939,10 @@ void FullCodeGenerator::VisitFunctionDeclaration(
|
|
|
| void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
|
| // Call the runtime to declare the globals.
|
| - // The context is the first argument.
|
| __ li(a1, Operand(pairs));
|
| __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
|
| - __ Push(cp, a1, a0);
|
| - __ CallRuntime(Runtime::kDeclareGlobals, 3);
|
| + __ Push(a1, a0);
|
| + __ CallRuntime(Runtime::kDeclareGlobals, 2);
|
| // Return value is ignored.
|
| }
|
|
|
|
|