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 47fe9118075bba5bfe444da00e925cf686fccd6e..f28ba8b9e54587ec59e831ebe376fd6f49f0f75e 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -864,22 +864,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; |
} |
} |
@@ -932,11 +931,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; |
} |
} |
@@ -945,11 +943,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. |
} |