| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index f4056777d4ba337e2355a322176fd01ae561cced..97bce098e49ae07570f03b5a150bf330798a48ca 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -2199,6 +2199,11 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
|
| __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
|
| __ j(equal, masm->isolate()->builtins()->CallFunction(mode, tail_call_mode),
|
| RelocInfo::CODE_TARGET);
|
| +
|
| + // Check if target has a [[Call]] internal method.
|
| + __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), 1 << Map::kIsCallable);
|
| + __ j(zero, &non_callable);
|
| +
|
| __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE);
|
| __ j(equal, masm->isolate()->builtins()->CallBoundFunction(tail_call_mode),
|
| RelocInfo::CODE_TARGET);
|
| @@ -2224,9 +2229,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.
|
| - __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), 1 << Map::kIsCallable);
|
| - __ j(zero, &non_callable, Label::kNear);
|
| // Overwrite the original receiver with the (original) target.
|
| __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi);
|
| // Let the "call_as_function_delegate" take care of the rest.
|
|
|