From 93205e395f777c1dd81d3f164cf9a4aec4bde45f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 13 Apr 2016 11:59:46 +0100 Subject: 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 --- compiler/utils/x86/assembler_x86.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/utils/x86/assembler_x86.cc') 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& area = constant_area_.GetBuffer(); + ArrayRef 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_); -- cgit v1.2.3-59-g8ed1b