Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index fe155506cd28a39e325306d759cb5d104b3f9a72..bb937519b235bb50fd5b326889b6b06f4930e9ad 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -3417,10 +3417,11 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { |
} |
VisitForAccumulatorValue(args->last()); // Function. |
- // Check for proxy. |
- Label proxy, done; |
- __ CompareObjectType(r0, r1, r1, JS_FUNCTION_PROXY_TYPE); |
- __ b(eq, &proxy); |
+ Label runtime, done; |
+ // Check for non-function argument (including proxy). |
+ __ JumpIfSmi(r0, &runtime); |
+ __ CompareObjectType(r0, r1, r1, JS_FUNCTION_TYPE); |
+ __ b(ne, &runtime); |
// InvokeFunction requires the function in r1. Move it in there. |
__ mov(r1, result_register()); |
@@ -3430,7 +3431,7 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { |
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
__ jmp(&done); |
- __ bind(&proxy); |
+ __ bind(&runtime); |
__ push(r0); |
__ CallRuntime(Runtime::kCall, args->length()); |
__ bind(&done); |