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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // Generate the OSR entry prologue at the first unknown OSR value, or if there | 240 // Generate the OSR entry prologue at the first unknown OSR value, or if there |
241 // are none, at the OSR entrypoint instruction. | 241 // are none, at the OSR entrypoint instruction. |
242 if (osr_pc_offset_ >= 0) return; | 242 if (osr_pc_offset_ >= 0) return; |
243 | 243 |
244 osr_pc_offset_ = masm()->pc_offset(); | 244 osr_pc_offset_ = masm()->pc_offset(); |
245 | 245 |
246 // Adjust the frame size, subsuming the unoptimized frame into the | 246 // Adjust the frame size, subsuming the unoptimized frame into the |
247 // optimized frame. | 247 // optimized frame. |
248 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 248 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
249 DCHECK(slots >= 0); | 249 DCHECK(slots >= 0); |
| 250 __ AdaptUnoptimizedFrameForOsrEntry(graph()->osr()->UnoptimizedFrameSlots(), |
| 251 r2, r0); |
250 __ sub(sp, sp, Operand(slots * kPointerSize)); | 252 __ sub(sp, sp, Operand(slots * kPointerSize)); |
251 } | 253 } |
252 | 254 |
253 | 255 |
254 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { | 256 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
255 if (instr->IsCall()) { | 257 if (instr->IsCall()) { |
256 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 258 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
257 } | 259 } |
258 if (!instr->IsLazyBailout() && !instr->IsGap()) { | 260 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
259 safepoints_.BumpLastLazySafepointIndex(); | 261 safepoints_.BumpLastLazySafepointIndex(); |
(...skipping 5676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5936 __ Push(scope_info); | 5938 __ Push(scope_info); |
5937 __ push(ToRegister(instr->function())); | 5939 __ push(ToRegister(instr->function())); |
5938 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5940 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5939 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5941 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5940 } | 5942 } |
5941 | 5943 |
5942 | 5944 |
5943 #undef __ | 5945 #undef __ |
5944 | 5946 |
5945 } } // namespace v8::internal | 5947 } } // namespace v8::internal |
OLD | NEW |