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

Side by Side Diff: src/x64/deoptimizer-x64.cc

Issue 1768263004: [turbofan] [deoptimizer] Support inlining of ES6 tail calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments, StandardFrameConstants -> CommonFrameConstants Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/full-codegen/full-codegen.h" 9 #include "src/full-codegen/full-codegen.h"
10 #include "src/register-configuration.h" 10 #include "src/register-configuration.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 __ PrepareCallCFunction(2); 224 __ PrepareCallCFunction(2);
225 __ movp(arg_reg_1, rax); 225 __ movp(arg_reg_1, rax);
226 __ LoadAddress(arg_reg_2, ExternalReference::isolate_address(isolate())); 226 __ LoadAddress(arg_reg_2, ExternalReference::isolate_address(isolate()));
227 { 227 {
228 AllowExternalCallThatCantCauseGC scope(masm()); 228 AllowExternalCallThatCantCauseGC scope(masm());
229 __ CallCFunction( 229 __ CallCFunction(
230 ExternalReference::compute_output_frames_function(isolate()), 2); 230 ExternalReference::compute_output_frames_function(isolate()), 2);
231 } 231 }
232 __ popq(rax); 232 __ popq(rax);
233 233
234 // Replace the current frame with the output frames. 234 __ movp(rsp, Operand(rax, Deoptimizer::caller_frame_top_offset()));
235
236 // Replace the current (input) frame with the output frames.
235 Label outer_push_loop, inner_push_loop, 237 Label outer_push_loop, inner_push_loop,
236 outer_loop_header, inner_loop_header; 238 outer_loop_header, inner_loop_header;
237 // Outer loop state: rax = current FrameDescription**, rdx = one past the 239 // Outer loop state: rax = current FrameDescription**, rdx = one past the
238 // last FrameDescription**. 240 // last FrameDescription**.
239 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset())); 241 __ movl(rdx, Operand(rax, Deoptimizer::output_count_offset()));
240 __ movp(rax, Operand(rax, Deoptimizer::output_offset())); 242 __ movp(rax, Operand(rax, Deoptimizer::output_offset()));
241 __ leap(rdx, Operand(rax, rdx, times_pointer_size, 0)); 243 __ leap(rdx, Operand(rax, rdx, times_pointer_size, 0));
242 __ jmp(&outer_loop_header); 244 __ jmp(&outer_loop_header);
243 __ bind(&outer_push_loop); 245 __ bind(&outer_push_loop);
244 // Inner loop state: rbx = current FrameDescription*, rcx = loop index. 246 // Inner loop state: rbx = current FrameDescription*, rcx = loop index.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 334 }
333 335
334 336
335 #undef __ 337 #undef __
336 338
337 339
338 } // namespace internal 340 } // namespace internal
339 } // namespace v8 341 } // namespace v8
340 342
341 #endif // V8_TARGET_ARCH_X64 343 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698