Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 281dc62c6b498ef8a0d28b3800862bcf89142b2d..09f4d59e356c0b8fe83fadc09f8de16b9b8e4e94 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -2274,6 +2274,12 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, |
RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE)); |
__ Jump(masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), |
RelocInfo::CODE_TARGET, eq, t2, Operand(JS_BOUND_FUNCTION_TYPE)); |
+ |
+ // Check if target has a [[Call]] internal method. |
+ __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset)); |
+ __ And(t1, t1, Operand(1 << Map::kIsCallable)); |
+ __ Branch(&non_callable, eq, t1, Operand(zero_reg)); |
+ |
__ Branch(&non_function, ne, t2, Operand(JS_PROXY_TYPE)); |
// 0. Prepare for tail call if necessary. |
@@ -2293,10 +2299,6 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, |
// 2. Call to something else, which might have a [[Call]] internal method (if |
// not we raise an exception). |
__ bind(&non_function); |
- // Check if target has a [[Call]] internal method. |
- __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset)); |
- __ And(t1, t1, Operand(1 << Map::kIsCallable)); |
- __ Branch(&non_callable, eq, t1, Operand(zero_reg)); |
// Overwrite the original receiver with the (original) target. |
__ Lsa(at, sp, a0, kPointerSizeLog2); |
__ sw(a1, MemOperand(at)); |