diff options
author | 2016-04-13 11:59:46 +0100 | |
---|---|---|
committer | 2016-04-13 17:50:16 +0100 | |
commit | 93205e395f777c1dd81d3f164cf9a4aec4bde45f (patch) | |
tree | 1d08efd9b7bca9fe23df9ae9489c5dd575d3c6df /compiler/utils/x86/assembler_x86.cc | |
parent | 6990775e323cd9164d6cc10955a047b9d9f15f32 (diff) |
Move Assemblers to the Arena.
And clean up some APIs to return std::unique_ptr<> instead
of raw pointers that don't communicate ownership.
Change-Id: I3017302307a0253d661240750298802fb0d9585e
Diffstat (limited to 'compiler/utils/x86/assembler_x86.cc')
-rw-r--r-- | compiler/utils/x86/assembler_x86.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc index 3efef70f77..2203646e77 100644 --- a/compiler/utils/x86/assembler_x86.cc +++ b/compiler/utils/x86/assembler_x86.cc @@ -2379,7 +2379,7 @@ void X86Assembler::GetCurrentThread(FrameOffset offset, } void X86Assembler::ExceptionPoll(ManagedRegister /*scratch*/, size_t stack_adjust) { - X86ExceptionSlowPath* slow = new X86ExceptionSlowPath(stack_adjust); + X86ExceptionSlowPath* slow = new (GetArena()) X86ExceptionSlowPath(stack_adjust); buffer_.EnqueueSlowPath(slow); fs()->cmpl(Address::Absolute(Thread::ExceptionOffset<4>()), Immediate(0)); j(kNotEqual, slow->Entry()); @@ -2402,7 +2402,7 @@ void X86ExceptionSlowPath::Emit(Assembler *sasm) { } void X86Assembler::AddConstantArea() { - const std::vector<int32_t>& area = constant_area_.GetBuffer(); + ArrayRef<const int32_t> area = constant_area_.GetBuffer(); // Generate the data for the literal area. for (size_t i = 0, e = area.size(); i < e; i++) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); |