Revision: 12316
Author: [email protected]
Date: Thu Aug 16 02:46:04 2012
Log: MIPS: Check for function in %_CallFunction.
Port r12299 (f6372257)
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10834317
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12316
Modified:
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Tue Aug 7
07:06:25 2012
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Thu Aug 16
02:46:04 2012
@@ -3460,10 +3460,11 @@
}
VisitForAccumulatorValue(args->last()); // Function.
- // Check for proxy.
- Label proxy, done;
+ Label runtime, done;
+ // Check for non-function argument (including proxy).
+ __ JumpIfSmi(v0, &runtime);
__ GetObjectType(v0, a1, a1);
- __ Branch(&proxy, eq, a1, Operand(JS_FUNCTION_PROXY_TYPE));
+ __ Branch(&runtime, ne, a1, Operand(JS_FUNCTION_TYPE));
// InvokeFunction requires the function in a1. Move it in there.
__ mov(a1, result_register());
@@ -3473,7 +3474,7 @@
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
__ jmp(&done);
- __ bind(&proxy);
+ __ bind(&runtime);
__ push(v0);
__ CallRuntime(Runtime::kCall, args->length());
__ bind(&done);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev