OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |