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/ast/scopes.h" | 8 #include "src/ast/scopes.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 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 } | 1650 } |
1651 } | 1651 } |
1652 | 1652 |
1653 | 1653 |
1654 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 1654 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
1655 // On 32-bit ARM we emit the jump tables inline. | 1655 // On 32-bit ARM we emit the jump tables inline. |
1656 UNREACHABLE(); | 1656 UNREACHABLE(); |
1657 } | 1657 } |
1658 | 1658 |
1659 | 1659 |
1660 void CodeGenerator::AddNopForSmiCodeInlining() { | |
1661 // On 32-bit ARM we do not insert nops for inlined Smi code. | |
1662 } | |
1663 | |
1664 | |
1665 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 1660 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
1666 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 1661 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
1667 return; | 1662 return; |
1668 } | 1663 } |
1669 | 1664 |
1670 int space_needed = Deoptimizer::patch_size(); | 1665 int space_needed = Deoptimizer::patch_size(); |
1671 // Ensure that we have enough space after the previous lazy-bailout | 1666 // Ensure that we have enough space after the previous lazy-bailout |
1672 // instruction for patching the code here. | 1667 // instruction for patching the code here. |
1673 int current_pc = masm()->pc_offset(); | 1668 int current_pc = masm()->pc_offset(); |
1674 if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 1669 if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
1675 // Block literal pool emission for duration of padding. | 1670 // Block literal pool emission for duration of padding. |
1676 v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm()); | 1671 v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm()); |
1677 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1672 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1678 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); | 1673 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); |
1679 while (padding_size > 0) { | 1674 while (padding_size > 0) { |
1680 __ nop(); | 1675 __ nop(); |
1681 padding_size -= v8::internal::Assembler::kInstrSize; | 1676 padding_size -= v8::internal::Assembler::kInstrSize; |
1682 } | 1677 } |
1683 } | 1678 } |
1684 } | 1679 } |
1685 | 1680 |
1686 #undef __ | 1681 #undef __ |
1687 | 1682 |
1688 } // namespace compiler | 1683 } // namespace compiler |
1689 } // namespace internal | 1684 } // namespace internal |
1690 } // namespace v8 | 1685 } // namespace v8 |
OLD | NEW |