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

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

Issue 1698273003: [es6] [interpreter] Add tail calls support to Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-turbo-2
Patch Set: Fixed Bytecodes::IsCallOrNew() Created 4 years, 10 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
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index 0794d9a6c31f13b866348b207b2eafa4eebee7a9..acbf0149d86cb6b41e8061575e90796d99e42b31 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -755,7 +755,8 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
// static
-void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
+void Builtins::Generate_InterpreterPushArgsAndCallImpl(
+ MacroAssembler* masm, TailCallMode tail_call_mode) {
// ----------- S t a t e -------------
// -- rax : the number of arguments (not including the receiver)
// -- rbx : the address of the first argument to be pushed. Subsequent
@@ -771,7 +772,9 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
// Call the target.
__ PushReturnAddressFrom(kScratchRegister); // Re-push return address.
- __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
+ tail_call_mode),
+ RelocInfo::CODE_TARGET);
}
@@ -2187,7 +2190,17 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
ExternalReference::debug_is_active_address(masm->isolate());
__ Move(kScratchRegister, debug_is_active);
__ cmpb(Operand(kScratchRegister, 0), Immediate(0));
- __ j(not_equal, &done, Label::kNear);
+ __ j(not_equal, &done);
+
+ // Drop possible interpreter handler/stub frame.
+ {
+ Label no_interpreter_frame;
+ __ Cmp(Operand(rbp, StandardFrameConstants::kMarkerOffset),
+ Smi::FromInt(StackFrame::STUB));
+ __ j(not_equal, &no_interpreter_frame, Label::kNear);
+ __ movp(rbp, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
+ __ bind(&no_interpreter_frame);
+ }
// Check if next frame is an arguments adaptor frame.
Label no_arguments_adaptor, formal_parameter_count_loaded;
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698