Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 06fd59468dbc5b437538a0c0703e4a3384a786e7..60121a97bcf7c952ecc8a97a8ea128d76b930abb 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -2044,7 +2044,8 @@ void Builtins::Generate_Apply(MacroAssembler* masm) { |
// static |
void Builtins::Generate_CallFunction(MacroAssembler* masm, |
- ConvertReceiverMode mode) { |
+ ConvertReceiverMode mode, |
+ TailCallMode tail_call_mode) { |
// ----------- S t a t e ------------- |
// -- rax : the number of arguments (not including the receiver) |
// -- rdi : the function to call (checked to be a JSFunction) |
@@ -2140,6 +2141,10 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm, |
// -- rsi : the function context. |
// ----------------------------------- |
+ if (tail_call_mode == TailCallMode::kAllow) { |
+ __ DropCurrentJSFrame(rax, rbx, rcx, r8); |
Benedikt Meurer
2016/01/21 05:20:49
We need to check whether the debugger is active, a
Igor Sheludko
2016/01/21 14:37:08
Done.
|
+ } |
+ |
__ LoadSharedFunctionInfoSpecialField( |
rbx, rdx, SharedFunctionInfo::kFormalParameterCountOffset); |
ParameterCount actual(rax); |