OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // r3: deoptimizer object; r4: scratch. | 225 // r3: deoptimizer object; r4: scratch. |
226 __ PrepareCallCFunction(1, r4); | 226 __ PrepareCallCFunction(1, r4); |
227 // Call Deoptimizer::ComputeOutputFrames(). | 227 // Call Deoptimizer::ComputeOutputFrames(). |
228 { | 228 { |
229 AllowExternalCallThatCantCauseGC scope(masm()); | 229 AllowExternalCallThatCantCauseGC scope(masm()); |
230 __ CallCFunction( | 230 __ CallCFunction( |
231 ExternalReference::compute_output_frames_function(isolate()), 1); | 231 ExternalReference::compute_output_frames_function(isolate()), 1); |
232 } | 232 } |
233 __ pop(r3); // Restore deoptimizer object (class Deoptimizer). | 233 __ pop(r3); // Restore deoptimizer object (class Deoptimizer). |
234 | 234 |
| 235 __ LoadP(sp, MemOperand(r3, Deoptimizer::caller_frame_top_offset())); |
| 236 |
235 // Replace the current (input) frame with the output frames. | 237 // Replace the current (input) frame with the output frames. |
236 Label outer_push_loop, inner_push_loop, outer_loop_header, inner_loop_header; | 238 Label outer_push_loop, inner_push_loop, outer_loop_header, inner_loop_header; |
237 // Outer loop state: r7 = current "FrameDescription** output_", | 239 // Outer loop state: r7 = current "FrameDescription** output_", |
238 // r4 = one past the last FrameDescription**. | 240 // r4 = one past the last FrameDescription**. |
239 __ lwz(r4, MemOperand(r3, Deoptimizer::output_count_offset())); | 241 __ lwz(r4, MemOperand(r3, Deoptimizer::output_count_offset())); |
240 __ LoadP(r7, MemOperand(r3, Deoptimizer::output_offset())); // r7 is output_. | 242 __ LoadP(r7, MemOperand(r3, Deoptimizer::output_offset())); // r7 is output_. |
241 __ ShiftLeftImm(r4, r4, Operand(kPointerSizeLog2)); | 243 __ ShiftLeftImm(r4, r4, Operand(kPointerSizeLog2)); |
242 __ add(r4, r7, r4); | 244 __ add(r4, r7, r4); |
243 __ b(&outer_loop_header); | 245 __ b(&outer_loop_header); |
244 | 246 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 331 |
330 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 332 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
331 DCHECK(FLAG_enable_embedded_constant_pool); | 333 DCHECK(FLAG_enable_embedded_constant_pool); |
332 SetFrameSlot(offset, value); | 334 SetFrameSlot(offset, value); |
333 } | 335 } |
334 | 336 |
335 | 337 |
336 #undef __ | 338 #undef __ |
337 } // namespace internal | 339 } // namespace internal |
338 } // namespace v8 | 340 } // namespace v8 |
OLD | NEW |