diff options
author | 2016-04-13 11:59:46 +0100 | |
---|---|---|
committer | 2016-04-13 17:50:16 +0100 | |
commit | 93205e395f777c1dd81d3f164cf9a4aec4bde45f (patch) | |
tree | 1d08efd9b7bca9fe23df9ae9489c5dd575d3c6df /compiler/optimizing/optimizing_compiler.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/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index cad94c7ad7..3670ce2253 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -948,13 +948,11 @@ bool OptimizingCompiler::JitCompile(Thread* self, info.frame_size_in_bytes = method_header->GetFrameSizeInBytes(); info.code_info = stack_map_size == 0 ? nullptr : stack_map_data; info.cfi = ArrayRef<const uint8_t>(*codegen->GetAssembler()->cfi().data()); - ArrayRef<const uint8_t> elf_file = debug::WriteDebugElfFileForMethods( + std::vector<uint8_t> elf_file = debug::WriteDebugElfFileForMethods( GetCompilerDriver()->GetInstructionSet(), GetCompilerDriver()->GetInstructionSetFeatures(), ArrayRef<const debug::MethodDebugInfo>(&info, 1)); - CreateJITCodeEntryForAddress(code_address, - std::unique_ptr<const uint8_t[]>(elf_file.data()), - elf_file.size()); + CreateJITCodeEntryForAddress(code_address, std::move(elf_file)); } Runtime::Current()->GetJit()->AddMemoryUsage(method, arena.BytesUsed()); |