Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 6811824f096f62766c8df7fc705a04b9d83eb16d..058830cde22a6abf55259b4d8f01b35c3001e18b 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -731,7 +731,8 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm, |
// static |
void Builtins::Generate_InterpreterPushArgsAndCallImpl( |
- MacroAssembler* masm, TailCallMode tail_call_mode) { |
+ MacroAssembler* masm, TailCallMode tail_call_mode, |
+ CallableType function_type) { |
// ----------- S t a t e ------------- |
// -- eax : the number of arguments (not including the receiver) |
// -- ebx : the address of the first argument to be pushed. Subsequent |
@@ -754,9 +755,16 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl( |
// Call the target. |
__ Push(edx); // Re-push return address. |
- __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, |
- tail_call_mode), |
- RelocInfo::CODE_TARGET); |
+ |
+ if (function_type == CallableType::kJSFunction) { |
+ __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, |
+ tail_call_mode), |
+ RelocInfo::CODE_TARGET); |
+ } else { |
+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, |
+ tail_call_mode), |
+ RelocInfo::CODE_TARGET); |
+ } |
} |