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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 if (info()->is_osr()) { | 994 if (info()->is_osr()) { |
995 // TurboFan OSR-compiled functions cannot be entered directly. | 995 // TurboFan OSR-compiled functions cannot be entered directly. |
996 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 996 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
997 | 997 |
998 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 998 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
999 // frame is still on the stack. Optimized code uses OSR values directly from | 999 // frame is still on the stack. Optimized code uses OSR values directly from |
1000 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1000 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1001 // remaining stack slots. | 1001 // remaining stack slots. |
1002 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1002 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
1003 osr_pc_offset_ = __ pc_offset(); | 1003 osr_pc_offset_ = __ pc_offset(); |
| 1004 // TODO(titzer): cannot address target function == local #-1 |
| 1005 __ ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1004 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); | 1006 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); |
1005 stack_slots -= frame()->GetOsrStackSlotCount(); | 1007 stack_slots -= frame()->GetOsrStackSlotCount(); |
1006 } | 1008 } |
1007 | 1009 |
1008 if (stack_slots > 0) { | 1010 if (stack_slots > 0) { |
1009 Register sp = __ StackPointer(); | 1011 Register sp = __ StackPointer(); |
1010 if (!sp.Is(csp)) { | 1012 if (!sp.Is(csp)) { |
1011 __ Sub(sp, sp, stack_slots * kPointerSize); | 1013 __ Sub(sp, sp, stack_slots * kPointerSize); |
1012 } | 1014 } |
1013 __ Sub(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); | 1015 __ Sub(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1217 } | 1219 } |
1218 } | 1220 } |
1219 MarkLazyDeoptSite(); | 1221 MarkLazyDeoptSite(); |
1220 } | 1222 } |
1221 | 1223 |
1222 #undef __ | 1224 #undef __ |
1223 | 1225 |
1224 } // namespace compiler | 1226 } // namespace compiler |
1225 } // namespace internal | 1227 } // namespace internal |
1226 } // namespace v8 | 1228 } // namespace v8 |
OLD | NEW |