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 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 if (info()->is_osr()) { | 1520 if (info()->is_osr()) { |
1521 // TurboFan OSR-compiled functions cannot be entered directly. | 1521 // TurboFan OSR-compiled functions cannot be entered directly. |
1522 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1522 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1523 | 1523 |
1524 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1524 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
1525 // frame is still on the stack. Optimized code uses OSR values directly from | 1525 // frame is still on the stack. Optimized code uses OSR values directly from |
1526 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1526 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1527 // remaining stack slots. | 1527 // remaining stack slots. |
1528 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1528 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
1529 osr_pc_offset_ = __ pc_offset(); | 1529 osr_pc_offset_ = __ pc_offset(); |
1530 // TODO(titzer): cannot address target function == local #-1 | |
1531 __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
1532 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); | 1530 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); |
1533 } | 1531 } |
1534 | 1532 |
1535 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 1533 const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); |
1536 if (saves_fpu != 0) { | 1534 if (saves_fpu != 0) { |
1537 stack_shrink_slots += frame()->AlignSavedCalleeRegisterSlots(); | 1535 stack_shrink_slots += frame()->AlignSavedCalleeRegisterSlots(); |
1538 } | 1536 } |
1539 if (stack_shrink_slots > 0) { | 1537 if (stack_shrink_slots > 0) { |
1540 __ Subu(sp, sp, Operand(stack_shrink_slots * kPointerSize)); | 1538 __ Subu(sp, sp, Operand(stack_shrink_slots * kPointerSize)); |
1541 } | 1539 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 padding_size -= v8::internal::Assembler::kInstrSize; | 1804 padding_size -= v8::internal::Assembler::kInstrSize; |
1807 } | 1805 } |
1808 } | 1806 } |
1809 } | 1807 } |
1810 | 1808 |
1811 #undef __ | 1809 #undef __ |
1812 | 1810 |
1813 } // namespace compiler | 1811 } // namespace compiler |
1814 } // namespace internal | 1812 } // namespace internal |
1815 } // namespace v8 | 1813 } // namespace v8 |
OLD | NEW |