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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // Generate the OSR entry prologue at the first unknown OSR value, or if there | 239 // Generate the OSR entry prologue at the first unknown OSR value, or if there |
240 // are none, at the OSR entrypoint instruction. | 240 // are none, at the OSR entrypoint instruction. |
241 if (osr_pc_offset_ >= 0) return; | 241 if (osr_pc_offset_ >= 0) return; |
242 | 242 |
243 osr_pc_offset_ = masm()->pc_offset(); | 243 osr_pc_offset_ = masm()->pc_offset(); |
244 | 244 |
245 // Adjust the frame size, subsuming the unoptimized frame into the | 245 // Adjust the frame size, subsuming the unoptimized frame into the |
246 // optimized frame. | 246 // optimized frame. |
247 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 247 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
248 DCHECK(slots >= 0); | 248 DCHECK(slots >= 0); |
| 249 __ OSRDropVectorFromStack(graph()->osr()->UnoptimizedFrameSlots(), r2, r0); |
249 __ sub(sp, sp, Operand(slots * kPointerSize)); | 250 __ sub(sp, sp, Operand(slots * kPointerSize)); |
250 } | 251 } |
251 | 252 |
252 | 253 |
253 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { | 254 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
254 if (instr->IsCall()) { | 255 if (instr->IsCall()) { |
255 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 256 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
256 } | 257 } |
257 if (!instr->IsLazyBailout() && !instr->IsGap()) { | 258 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
258 safepoints_.BumpLastLazySafepointIndex(); | 259 safepoints_.BumpLastLazySafepointIndex(); |
(...skipping 5718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5977 __ Push(scope_info); | 5978 __ Push(scope_info); |
5978 __ push(ToRegister(instr->function())); | 5979 __ push(ToRegister(instr->function())); |
5979 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5980 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5980 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5981 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5981 } | 5982 } |
5982 | 5983 |
5983 | 5984 |
5984 #undef __ | 5985 #undef __ |
5985 | 5986 |
5986 } } // namespace v8::internal | 5987 } } // namespace v8::internal |
OLD | NEW |