OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1827 __ Bind(entry_label()); | 1827 __ Bind(entry_label()); |
1828 const Code& stub = Code::ZoneHandle( | 1828 const Code& stub = Code::ZoneHandle( |
1829 compiler->zone(), StubCode::GetAllocationStubForClass(cls_)); | 1829 compiler->zone(), StubCode::GetAllocationStubForClass(cls_)); |
1830 const StubEntry stub_entry(stub); | 1830 const StubEntry stub_entry(stub); |
1831 | 1831 |
1832 LocationSummary* locs = instruction_->locs(); | 1832 LocationSummary* locs = instruction_->locs(); |
1833 | 1833 |
1834 locs->live_registers()->Remove(Location::RegisterLocation(result_)); | 1834 locs->live_registers()->Remove(Location::RegisterLocation(result_)); |
1835 | 1835 |
1836 compiler->SaveLiveRegisters(locs); | 1836 compiler->SaveLiveRegisters(locs); |
1837 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. | 1837 compiler->GenerateCall(Token::kNoSourcePos, // No token position. |
1838 stub_entry, | 1838 stub_entry, |
1839 RawPcDescriptors::kOther, | 1839 RawPcDescriptors::kOther, |
1840 locs); | 1840 locs); |
1841 compiler->AddStubCallTarget(stub); | 1841 compiler->AddStubCallTarget(stub); |
1842 __ MoveRegister(result_, R0); | 1842 __ MoveRegister(result_, R0); |
1843 compiler->RestoreLiveRegisters(locs); | 1843 compiler->RestoreLiveRegisters(locs); |
1844 __ b(exit_label()); | 1844 __ b(exit_label()); |
1845 } | 1845 } |
1846 | 1846 |
1847 static void Allocate(FlowGraphCompiler* compiler, | 1847 static void Allocate(FlowGraphCompiler* compiler, |
(...skipping 4796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6644 | 6644 |
6645 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6645 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6646 if (!compiler->is_optimizing()) { | 6646 if (!compiler->is_optimizing()) { |
6647 if (FLAG_emit_edge_counters) { | 6647 if (FLAG_emit_edge_counters) { |
6648 compiler->EmitEdgeCounter(block()->preorder_number()); | 6648 compiler->EmitEdgeCounter(block()->preorder_number()); |
6649 } | 6649 } |
6650 // Add a deoptimization descriptor for deoptimizing instructions that | 6650 // Add a deoptimization descriptor for deoptimizing instructions that |
6651 // may be inserted before this instruction. | 6651 // may be inserted before this instruction. |
6652 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 6652 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
6653 GetDeoptId(), | 6653 GetDeoptId(), |
6654 Scanner::kNoSourcePos); | 6654 Token::kNoSourcePos); |
6655 } | 6655 } |
6656 if (HasParallelMove()) { | 6656 if (HasParallelMove()) { |
6657 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 6657 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
6658 } | 6658 } |
6659 | 6659 |
6660 // We can fall through if the successor is the next block in the list. | 6660 // We can fall through if the successor is the next block in the list. |
6661 // Otherwise, we need a jump. | 6661 // Otherwise, we need a jump. |
6662 if (!compiler->CanFallThroughTo(successor())) { | 6662 if (!compiler->CanFallThroughTo(successor())) { |
6663 __ b(compiler->GetJumpLabel(successor())); | 6663 __ b(compiler->GetJumpLabel(successor())); |
6664 } | 6664 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6847 locs->set_out(0, Location::RegisterLocation(R0)); | 6847 locs->set_out(0, Location::RegisterLocation(R0)); |
6848 return locs; | 6848 return locs; |
6849 } | 6849 } |
6850 | 6850 |
6851 | 6851 |
6852 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6852 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6853 const Register typed_data = locs()->in(0).reg(); | 6853 const Register typed_data = locs()->in(0).reg(); |
6854 const Register result = locs()->out(0).reg(); | 6854 const Register result = locs()->out(0).reg(); |
6855 __ PushObject(Object::null_object()); | 6855 __ PushObject(Object::null_object()); |
6856 __ Push(typed_data); | 6856 __ Push(typed_data); |
6857 compiler->GenerateRuntimeCall(Scanner::kNoSourcePos, // No token position. | 6857 compiler->GenerateRuntimeCall(Token::kNoSourcePos, // No token position. |
6858 deopt_id(), | 6858 deopt_id(), |
6859 kGrowRegExpStackRuntimeEntry, | 6859 kGrowRegExpStackRuntimeEntry, |
6860 1, | 6860 1, |
6861 locs()); | 6861 locs()); |
6862 __ Drop(1); | 6862 __ Drop(1); |
6863 __ Pop(result); | 6863 __ Pop(result); |
6864 } | 6864 } |
6865 | 6865 |
6866 | 6866 |
6867 } // namespace dart | 6867 } // namespace dart |
6868 | 6868 |
6869 #endif // defined TARGET_ARCH_ARM | 6869 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |