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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 if (info()->is_osr()) { | 930 if (info()->is_osr()) { |
931 // TurboFan OSR-compiled functions cannot be entered directly. | 931 // TurboFan OSR-compiled functions cannot be entered directly. |
932 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 932 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
933 | 933 |
934 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 934 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
935 // frame is still on the stack. Optimized code uses OSR values directly from | 935 // frame is still on the stack. Optimized code uses OSR values directly from |
936 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 936 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
937 // remaining stack slots. | 937 // remaining stack slots. |
938 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 938 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
939 osr_pc_offset_ = __ pc_offset(); | 939 osr_pc_offset_ = __ pc_offset(); |
940 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); | 940 int osr_stack_slot_count = frame()->GetOsrStackSlotCount(); |
941 stack_slots -= frame()->GetOsrStackSlotCount(); | 941 DCHECK(stack_slots >= osr_stack_slot_count); |
| 942 stack_slots -= osr_stack_slot_count; |
| 943 |
| 944 // Full-code javascript functions have a type feedback vector in the frame. |
| 945 // Shift any locals down one slot, and adjust the stack pointer. |
| 946 __ OSRDropVectorFromStack(osr_stack_slot_count, x2, x0); |
942 } | 947 } |
943 | 948 |
944 if (stack_slots > 0) { | 949 if (stack_slots > 0) { |
945 Register sp = __ StackPointer(); | 950 Register sp = __ StackPointer(); |
946 if (!sp.Is(csp)) { | 951 if (!sp.Is(csp)) { |
947 __ Sub(sp, sp, stack_slots * kPointerSize); | 952 __ Sub(sp, sp, stack_slots * kPointerSize); |
948 } | 953 } |
949 __ Sub(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); | 954 __ Sub(csp, csp, AlignedStackSlots(stack_slots) * kPointerSize); |
950 } | 955 } |
951 } | 956 } |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 } | 1158 } |
1154 } | 1159 } |
1155 MarkLazyDeoptSite(); | 1160 MarkLazyDeoptSite(); |
1156 } | 1161 } |
1157 | 1162 |
1158 #undef __ | 1163 #undef __ |
1159 | 1164 |
1160 } // namespace compiler | 1165 } // namespace compiler |
1161 } // namespace internal | 1166 } // namespace internal |
1162 } // namespace v8 | 1167 } // namespace v8 |
OLD | NEW |