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/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 } | 1829 } |
1830 } | 1830 } |
1831 | 1831 |
1832 | 1832 |
1833 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 1833 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
1834 // On 64-bit ARM we emit the jump tables inline. | 1834 // On 64-bit ARM we emit the jump tables inline. |
1835 UNREACHABLE(); | 1835 UNREACHABLE(); |
1836 } | 1836 } |
1837 | 1837 |
1838 | 1838 |
1839 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } | |
1840 | |
1841 | |
1842 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 1839 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
1843 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 1840 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
1844 return; | 1841 return; |
1845 } | 1842 } |
1846 | 1843 |
1847 int space_needed = Deoptimizer::patch_size(); | 1844 int space_needed = Deoptimizer::patch_size(); |
1848 // Ensure that we have enough space after the previous lazy-bailout | 1845 // Ensure that we have enough space after the previous lazy-bailout |
1849 // instruction for patching the code here. | 1846 // instruction for patching the code here. |
1850 intptr_t current_pc = masm()->pc_offset(); | 1847 intptr_t current_pc = masm()->pc_offset(); |
1851 | 1848 |
1852 if (current_pc < (last_lazy_deopt_pc_ + space_needed)) { | 1849 if (current_pc < (last_lazy_deopt_pc_ + space_needed)) { |
1853 intptr_t padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1850 intptr_t padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1854 DCHECK((padding_size % kInstructionSize) == 0); | 1851 DCHECK((padding_size % kInstructionSize) == 0); |
1855 InstructionAccurateScope instruction_accurate( | 1852 InstructionAccurateScope instruction_accurate( |
1856 masm(), padding_size / kInstructionSize); | 1853 masm(), padding_size / kInstructionSize); |
1857 | 1854 |
1858 while (padding_size > 0) { | 1855 while (padding_size > 0) { |
1859 __ nop(); | 1856 __ nop(); |
1860 padding_size -= kInstructionSize; | 1857 padding_size -= kInstructionSize; |
1861 } | 1858 } |
1862 } | 1859 } |
1863 } | 1860 } |
1864 | 1861 |
1865 #undef __ | 1862 #undef __ |
1866 | 1863 |
1867 } // namespace compiler | 1864 } // namespace compiler |
1868 } // namespace internal | 1865 } // namespace internal |
1869 } // namespace v8 | 1866 } // namespace v8 |
OLD | NEW |