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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
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/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 if (info()->is_osr()) { | 1829 if (info()->is_osr()) { |
1830 // TurboFan OSR-compiled functions cannot be entered directly. | 1830 // TurboFan OSR-compiled functions cannot be entered directly. |
1831 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1831 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1832 | 1832 |
1833 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1833 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
1834 // frame is still on the stack. Optimized code uses OSR values directly from | 1834 // frame is still on the stack. Optimized code uses OSR values directly from |
1835 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1835 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1836 // remaining stack slots. | 1836 // remaining stack slots. |
1837 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1837 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
1838 osr_pc_offset_ = __ pc_offset(); | 1838 osr_pc_offset_ = __ pc_offset(); |
1839 // TODO(titzer): cannot address target function == local #-1 | |
1840 __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
1841 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); | 1839 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); |
1842 } | 1840 } |
1843 | 1841 |
1844 if (stack_shrink_slots > 0) { | 1842 if (stack_shrink_slots > 0) { |
1845 __ Dsubu(sp, sp, Operand(stack_shrink_slots * kPointerSize)); | 1843 __ Dsubu(sp, sp, Operand(stack_shrink_slots * kPointerSize)); |
1846 } | 1844 } |
1847 | 1845 |
1848 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 1846 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); |
1849 if (saves_fpu != 0) { | 1847 if (saves_fpu != 0) { |
1850 // Save callee-saved FPU registers. | 1848 // Save callee-saved FPU registers. |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 padding_size -= v8::internal::Assembler::kInstrSize; | 2110 padding_size -= v8::internal::Assembler::kInstrSize; |
2113 } | 2111 } |
2114 } | 2112 } |
2115 } | 2113 } |
2116 | 2114 |
2117 #undef __ | 2115 #undef __ |
2118 | 2116 |
2119 } // namespace compiler | 2117 } // namespace compiler |
2120 } // namespace internal | 2118 } // namespace internal |
2121 } // namespace v8 | 2119 } // namespace v8 |
OLD | NEW |