Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index b7f30433d5f35a33128b1494639b82679c1174b9..b64f4e68aecf92317aaa77bdc21522008b89c6e1 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -3553,29 +3553,68 @@ BUILTIN(HandleApiCallConstruct) { |
return *result; |
} |
- |
-Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode) { |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return CallFunction_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return CallFunction_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return CallFunction_ReceiverIsAny(); |
+Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode, |
+ TailCallMode tail_call_mode) { |
+ switch (tail_call_mode) { |
+ case TailCallMode::kDisallow: |
+ switch (mode) { |
+ case ConvertReceiverMode::kNullOrUndefined: |
+ return CallFunction_ReceiverIsNullOrUndefined(); |
+ case ConvertReceiverMode::kNotNullOrUndefined: |
+ return CallFunction_ReceiverIsNotNullOrUndefined(); |
+ case ConvertReceiverMode::kAny: |
+ return CallFunction_ReceiverIsAny(); |
+ } |
+ break; |
+ case TailCallMode::kAllow: |
+ switch (mode) { |
+ case ConvertReceiverMode::kNullOrUndefined: |
+ return TailCallFunction_ReceiverIsNullOrUndefined(); |
+ case ConvertReceiverMode::kNotNullOrUndefined: |
+ return TailCallFunction_ReceiverIsNotNullOrUndefined(); |
+ case ConvertReceiverMode::kAny: |
+ return TailCallFunction_ReceiverIsAny(); |
+ } |
+ break; |
} |
UNREACHABLE(); |
return Handle<Code>::null(); |
} |
+Handle<Code> Builtins::Call(ConvertReceiverMode mode, |
+ TailCallMode tail_call_mode) { |
+ switch (tail_call_mode) { |
+ case TailCallMode::kDisallow: |
+ switch (mode) { |
+ case ConvertReceiverMode::kNullOrUndefined: |
+ return Call_ReceiverIsNullOrUndefined(); |
+ case ConvertReceiverMode::kNotNullOrUndefined: |
+ return Call_ReceiverIsNotNullOrUndefined(); |
+ case ConvertReceiverMode::kAny: |
+ return Call_ReceiverIsAny(); |
+ } |
+ break; |
+ case TailCallMode::kAllow: |
+ switch (mode) { |
+ case ConvertReceiverMode::kNullOrUndefined: |
+ return TailCall_ReceiverIsNullOrUndefined(); |
+ case ConvertReceiverMode::kNotNullOrUndefined: |
+ return TailCall_ReceiverIsNotNullOrUndefined(); |
+ case ConvertReceiverMode::kAny: |
+ return TailCall_ReceiverIsAny(); |
+ } |
+ break; |
+ } |
+ UNREACHABLE(); |
+ return Handle<Code>::null(); |
+} |
-Handle<Code> Builtins::Call(ConvertReceiverMode mode) { |
- switch (mode) { |
- case ConvertReceiverMode::kNullOrUndefined: |
- return Call_ReceiverIsNullOrUndefined(); |
- case ConvertReceiverMode::kNotNullOrUndefined: |
- return Call_ReceiverIsNotNullOrUndefined(); |
- case ConvertReceiverMode::kAny: |
- return Call_ReceiverIsAny(); |
+Handle<Code> Builtins::CallBoundFunction(TailCallMode tail_call_mode) { |
+ switch (tail_call_mode) { |
+ case TailCallMode::kDisallow: |
+ return CallBoundFunction(); |
+ case TailCallMode::kAllow: |
+ return TailCallBoundFunction(); |
} |
UNREACHABLE(); |
return Handle<Code>::null(); |