Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 81478804d9e740967acd8d1e6cad2efc94d92827..d92048d9db86a018ebaf0c1819ba526f3e19126b 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -831,21 +831,21 @@ void FullCodeGenerator::VisitVariableDeclaration( |
__ mov(r5, Operand(variable->name())); |
// Declaration nodes are always introduced in one of four modes. |
DCHECK(IsDeclaredVariableMode(mode)); |
- PropertyAttributes attr = |
- IsImmutableVariableMode(mode) ? READ_ONLY : NONE; |
- __ LoadSmiLiteral(r4, 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(r3, Heap::kTheHoleValueRootIndex); |
- __ Push(cp, r5, r4, r3); |
+ __ Push(r5, r3); |
} else { |
__ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value. |
- __ Push(cp, r5, r4, r3); |
+ __ Push(r5, r3); |
} |
- __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
+ __ CallRuntime(IsImmutableVariableMode(mode) |
+ ? Runtime::kDeclareReadOnlyLookupSlot |
+ : Runtime::kDeclareLookupSlot, |
+ 2); |
break; |
} |
} |
@@ -893,11 +893,10 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
case VariableLocation::LOOKUP: { |
Comment cmnt(masm_, "[ FunctionDeclaration"); |
__ mov(r5, Operand(variable->name())); |
- __ LoadSmiLiteral(r4, Smi::FromInt(NONE)); |
- __ Push(cp, r5, r4); |
+ __ Push(r5); |
// Push initial value for function declaration. |
VisitForStackValue(declaration->fun()); |
- __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
+ __ CallRuntime(Runtime::kDeclareLookupSlot, 2); |
break; |
} |
} |
@@ -906,11 +905,10 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
// Call the runtime to declare the globals. |
- // The context is the first argument. |
__ mov(r4, Operand(pairs)); |
__ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags())); |
- __ Push(cp, r4, r3); |
- __ CallRuntime(Runtime::kDeclareGlobals, 3); |
+ __ Push(r4, r3); |
+ __ CallRuntime(Runtime::kDeclareGlobals, 2); |
// Return value is ignored. |
} |