Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 02a700574578e08a0deca80bdbddc6ea544be78e..11eac8e2c4189b5979d50060e1983d34426fa70b 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -5871,12 +5871,21 @@ Handle<Code> Builtins::CallBoundFunction(TailCallMode tail_call_mode) { |
return Handle<Code>::null(); |
} |
-Handle<Code> Builtins::InterpreterPushArgsAndCall(TailCallMode tail_call_mode) { |
+Handle<Code> Builtins::InterpreterPushArgsAndCall(TailCallMode tail_call_mode, |
+ CallableType function_type) { |
switch (tail_call_mode) { |
case TailCallMode::kDisallow: |
- return InterpreterPushArgsAndCall(); |
+ if (function_type == CallableType::kJSFunction) { |
+ return InterpreterPushArgsAndCallFunction(); |
+ } else { |
+ return InterpreterPushArgsAndCall(); |
+ } |
case TailCallMode::kAllow: |
- return InterpreterPushArgsAndTailCall(); |
+ if (function_type == CallableType::kJSFunction) { |
+ return InterpreterPushArgsAndTailCallFunction(); |
+ } else { |
+ return InterpreterPushArgsAndTailCall(); |
+ } |
} |
UNREACHABLE(); |
return Handle<Code>::null(); |