Index: src/ppc/builtins-ppc.cc |
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
index d83e82a765ee2274113467ac26891046b0eb9d01..f0b76ccc39c88cdc8c9b2b79a5b7711da5cda9cf 100644 |
--- a/src/ppc/builtins-ppc.cc |
+++ b/src/ppc/builtins-ppc.cc |
@@ -2325,6 +2325,12 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, |
__ cmpi(r8, Operand(JS_BOUND_FUNCTION_TYPE)); |
__ Jump(masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), |
RelocInfo::CODE_TARGET, eq); |
+ |
+ // Check if target has a [[Call]] internal method. |
+ __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); |
+ __ TestBit(r7, Map::kIsCallable, r0); |
+ __ beq(&non_callable, cr0); |
+ |
__ cmpi(r8, Operand(JS_PROXY_TYPE)); |
__ bne(&non_function); |
@@ -2345,10 +2351,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. |
- __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); |
- __ TestBit(r7, Map::kIsCallable, r0); |
- __ beq(&non_callable, cr0); |
// Overwrite the original receiver the (original) target. |
__ ShiftLeftImm(r8, r3, Operand(kPointerSizeLog2)); |
__ StorePX(r4, MemOperand(sp, r8)); |