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/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 if (FLAG_enable_embedded_constant_pool) { | 1683 if (FLAG_enable_embedded_constant_pool) { |
1684 __ Push(lr, fp, pp); | 1684 __ Push(lr, fp, pp); |
1685 // Adjust FP to point to saved FP. | 1685 // Adjust FP to point to saved FP. |
1686 __ sub(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); | 1686 __ sub(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); |
1687 } else { | 1687 } else { |
1688 __ Push(lr, fp); | 1688 __ Push(lr, fp); |
1689 __ mov(fp, sp); | 1689 __ mov(fp, sp); |
1690 } | 1690 } |
1691 } else if (descriptor->IsJSFunctionCall()) { | 1691 } else if (descriptor->IsJSFunctionCall()) { |
1692 __ Prologue(this->info()->GeneratePreagedPrologue()); | 1692 __ Prologue(this->info()->GeneratePreagedPrologue()); |
| 1693 if (descriptor->PushArgumentCount()) { |
| 1694 __ Push(kJavaScriptCallArgCountRegister); |
| 1695 } |
1693 } else { | 1696 } else { |
1694 __ StubPrologue(info()->GetOutputStackFrameType()); | 1697 __ StubPrologue(info()->GetOutputStackFrameType()); |
1695 } | 1698 } |
1696 | 1699 |
1697 if (!info()->GeneratePreagedPrologue()) { | 1700 if (!info()->GeneratePreagedPrologue()) { |
1698 unwinding_info_writer_.MarkFrameConstructed(__ pc_offset()); | 1701 unwinding_info_writer_.MarkFrameConstructed(__ pc_offset()); |
1699 } | 1702 } |
1700 } | 1703 } |
1701 | 1704 |
1702 int shrink_slots = frame()->GetSpillSlotCount(); | 1705 int shrink_slots = |
| 1706 frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); |
1703 | 1707 |
1704 if (info()->is_osr()) { | 1708 if (info()->is_osr()) { |
1705 // TurboFan OSR-compiled functions cannot be entered directly. | 1709 // TurboFan OSR-compiled functions cannot be entered directly. |
1706 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1710 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1707 | 1711 |
1708 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1712 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
1709 // frame is still on the stack. Optimized code uses OSR values directly from | 1713 // frame is still on the stack. Optimized code uses OSR values directly from |
1710 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1714 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1711 // remaining stack slots. | 1715 // remaining stack slots. |
1712 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1716 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 padding_size -= v8::internal::Assembler::kInstrSize; | 2053 padding_size -= v8::internal::Assembler::kInstrSize; |
2050 } | 2054 } |
2051 } | 2055 } |
2052 } | 2056 } |
2053 | 2057 |
2054 #undef __ | 2058 #undef __ |
2055 | 2059 |
2056 } // namespace compiler | 2060 } // namespace compiler |
2057 } // namespace internal | 2061 } // namespace internal |
2058 } // namespace v8 | 2062 } // namespace v8 |
OLD | NEW |