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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 if (info()->is_osr()) { | 1258 if (info()->is_osr()) { |
1259 // TurboFan OSR-compiled functions cannot be entered directly. | 1259 // TurboFan OSR-compiled functions cannot be entered directly. |
1260 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1260 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1261 | 1261 |
1262 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1262 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
1263 // frame is still on the stack. Optimized code uses OSR values directly from | 1263 // frame is still on the stack. Optimized code uses OSR values directly from |
1264 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1264 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1265 // remaining stack slots. | 1265 // remaining stack slots. |
1266 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1266 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
1267 osr_pc_offset_ = __ pc_offset(); | 1267 osr_pc_offset_ = __ pc_offset(); |
| 1268 // TODO(titzer): cannot address target function == local #-1 |
| 1269 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
1268 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); | 1270 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); |
1269 stack_slots -= frame()->GetOsrStackSlotCount(); | 1271 stack_slots -= frame()->GetOsrStackSlotCount(); |
1270 } | 1272 } |
1271 | 1273 |
1272 if (stack_slots > 0) { | 1274 if (stack_slots > 0) { |
1273 __ subq(rsp, Immediate(stack_slots * kPointerSize)); | 1275 __ subq(rsp, Immediate(stack_slots * kPointerSize)); |
1274 } | 1276 } |
1275 } | 1277 } |
1276 | 1278 |
1277 | 1279 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 } | 1502 } |
1501 } | 1503 } |
1502 MarkLazyDeoptSite(); | 1504 MarkLazyDeoptSite(); |
1503 } | 1505 } |
1504 | 1506 |
1505 #undef __ | 1507 #undef __ |
1506 | 1508 |
1507 } // namespace internal | 1509 } // namespace internal |
1508 } // namespace compiler | 1510 } // namespace compiler |
1509 } // namespace v8 | 1511 } // namespace v8 |
OLD | NEW |