Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 47d705fa8872ddf7cde8935e6e8f7e3d69f8af49..04e0675097b4a937286efe7c6b67d598c640069c 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -2944,13 +2944,16 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) { |
void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
- // r4: copy of the first argument or undefined if it doesn't exist. |
+ // r5: copy of the first argument or undefined if it doesn't exist. |
if (arg_count > 0) { |
- __ ldr(r4, MemOperand(sp, arg_count * kPointerSize)); |
+ __ ldr(r5, MemOperand(sp, arg_count * kPointerSize)); |
} else { |
- __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); |
+ __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); |
} |
+ // r4: the receiver of the enclosing function. |
+ __ ldr(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
+ |
// r3: the receiver of the enclosing function. |
int receiver_offset = 2 + info_->scope()->num_parameters(); |
__ ldr(r3, MemOperand(fp, receiver_offset * kPointerSize)); |
@@ -2962,8 +2965,9 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
__ mov(r1, Operand(Smi::FromInt(scope()->start_position()))); |
// Do the runtime call. |
+ __ Push(r5); |
__ Push(r4, r3, r2, r1); |
- __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); |
+ __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
} |