Reviewers: Yang, danno, Paul Lind, kisg,
Description:
MIPS: Check for function in %_CallFunction.
Port r12299 (f6372257)
BUG=
TEST=
Please review this at https://chromiumcodereview.appspot.com/10834317/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mips/full-codegen-mips.cc
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
f4f89b6cfb9e073e5d909e81414ba739ba3c3192..103ab4144d3474f3e4cccc9510eaf81e3e823264
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -3460,10 +3460,11 @@ void
FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
}
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 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime*
expr) {
__ 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