OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/codegen.h" | 5 #include "src/codegen.h" |
6 #include "src/deoptimizer.h" | 6 #include "src/deoptimizer.h" |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
9 #include "src/safepoint-table.h" | 9 #include "src/safepoint-table.h" |
10 | 10 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // a0: deoptimizer object; a1: scratch. | 231 // a0: deoptimizer object; a1: scratch. |
232 __ PrepareCallCFunction(1, a1); | 232 __ PrepareCallCFunction(1, a1); |
233 // Call Deoptimizer::ComputeOutputFrames(). | 233 // Call Deoptimizer::ComputeOutputFrames(). |
234 { | 234 { |
235 AllowExternalCallThatCantCauseGC scope(masm()); | 235 AllowExternalCallThatCantCauseGC scope(masm()); |
236 __ CallCFunction( | 236 __ CallCFunction( |
237 ExternalReference::compute_output_frames_function(isolate()), 1); | 237 ExternalReference::compute_output_frames_function(isolate()), 1); |
238 } | 238 } |
239 __ pop(a0); // Restore deoptimizer object (class Deoptimizer). | 239 __ pop(a0); // Restore deoptimizer object (class Deoptimizer). |
240 | 240 |
| 241 __ lw(sp, MemOperand(a0, Deoptimizer::caller_frame_top_offset())); |
| 242 |
241 // Replace the current (input) frame with the output frames. | 243 // Replace the current (input) frame with the output frames. |
242 Label outer_push_loop, inner_push_loop, | 244 Label outer_push_loop, inner_push_loop, |
243 outer_loop_header, inner_loop_header; | 245 outer_loop_header, inner_loop_header; |
244 // Outer loop state: t0 = current "FrameDescription** output_", | 246 // Outer loop state: t0 = current "FrameDescription** output_", |
245 // a1 = one past the last FrameDescription**. | 247 // a1 = one past the last FrameDescription**. |
246 __ lw(a1, MemOperand(a0, Deoptimizer::output_count_offset())); | 248 __ lw(a1, MemOperand(a0, Deoptimizer::output_count_offset())); |
247 __ lw(t0, MemOperand(a0, Deoptimizer::output_offset())); // t0 is output_. | 249 __ lw(t0, MemOperand(a0, Deoptimizer::output_offset())); // t0 is output_. |
248 __ Lsa(a1, t0, a1, kPointerSizeLog2); | 250 __ Lsa(a1, t0, a1, kPointerSizeLog2); |
249 __ BranchShort(&outer_loop_header); | 251 __ BranchShort(&outer_loop_header); |
250 __ bind(&outer_push_loop); | 252 __ bind(&outer_push_loop); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // No embedded constant pool support. | 383 // No embedded constant pool support. |
382 UNREACHABLE(); | 384 UNREACHABLE(); |
383 } | 385 } |
384 | 386 |
385 | 387 |
386 #undef __ | 388 #undef __ |
387 | 389 |
388 | 390 |
389 } // namespace internal | 391 } // namespace internal |
390 } // namespace v8 | 392 } // namespace v8 |
OLD | NEW |