OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // Generate the OSR entry prologue at the first unknown OSR value, or if there | 248 // Generate the OSR entry prologue at the first unknown OSR value, or if there |
249 // are none, at the OSR entrypoint instruction. | 249 // are none, at the OSR entrypoint instruction. |
250 if (osr_pc_offset_ >= 0) return; | 250 if (osr_pc_offset_ >= 0) return; |
251 | 251 |
252 osr_pc_offset_ = masm()->pc_offset(); | 252 osr_pc_offset_ = masm()->pc_offset(); |
253 | 253 |
254 // Adjust the frame size, subsuming the unoptimized frame into the | 254 // Adjust the frame size, subsuming the unoptimized frame into the |
255 // optimized frame. | 255 // optimized frame. |
256 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 256 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
257 DCHECK(slots >= 0); | 257 DCHECK(slots >= 0); |
| 258 __ AdaptUnoptimizedFrameForOsrEntry(graph()->osr()->UnoptimizedFrameSlots(), |
| 259 rbx, rax); |
258 __ subp(rsp, Immediate(slots * kPointerSize)); | 260 __ subp(rsp, Immediate(slots * kPointerSize)); |
259 } | 261 } |
260 | 262 |
261 | 263 |
262 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { | 264 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
263 if (instr->IsCall()) { | 265 if (instr->IsCall()) { |
264 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 266 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
265 } | 267 } |
266 if (!instr->IsLazyBailout() && !instr->IsGap()) { | 268 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
267 safepoints_.BumpLastLazySafepointIndex(); | 269 safepoints_.BumpLastLazySafepointIndex(); |
(...skipping 5665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5933 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5935 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5934 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5936 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5935 } | 5937 } |
5936 | 5938 |
5937 | 5939 |
5938 #undef __ | 5940 #undef __ |
5939 | 5941 |
5940 } } // namespace v8::internal | 5942 } } // namespace v8::internal |
5941 | 5943 |
5942 #endif // V8_TARGET_ARCH_X64 | 5944 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |