Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index ff068196b83720322b2369c252f949371d80604b..1d8d5d35990e76cb26e86895a6f11190046bbb70 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -2267,6 +2267,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. |
@@ -2286,10 +2292,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. |
__ Dlsa(at, sp, a0, kPointerSizeLog2); |
__ sd(a1, MemOperand(at)); |