Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: src/x64/builtins-x64.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « src/parsing/parser.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | src/x64/macro-assembler-x64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698