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

Unified Diff: src/x64/code-stubs-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/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 7f976940b5a2213e505c3af0005405d9efb1dc8b..03f73f06487c8f30db3561e72eee37a782156f22 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2002,8 +2002,11 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ bind(&call_function);
__ Set(rax, argc);
- __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode()),
- RelocInfo::CODE_TARGET);
+ Handle<Code> call_function_builtin =
+ tail_call_mode() == TailCallMode::kDisallow
+ ? masm->isolate()->builtins()->CallFunction(convert_mode())
+ : masm->isolate()->builtins()->TailCallFunction(convert_mode());
+ __ Jump(call_function_builtin, RelocInfo::CODE_TARGET);
__ bind(&extra_checks_or_miss);
Label uninitialized, miss, not_allocation_site;

Powered by Google App Engine
This is Rietveld 408576698