Remove CodeAllocator and the extra copy of generated code.
The code used to copy the final generated code twice: from assembler to
CodeAllocator, and then to CodeAllocator to SwapAllocator/JitMemory.
The assemblers never depended on the exact location of the generated
code, so just drop that feature.
Test: test.py
Change-Id: I8dc82e4926097092b9aac336a5a5d40f79dc62ca
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index 810c843..c2e5064 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -1583,7 +1583,7 @@
size_t cs = assembler_->CodeSize();
std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>(cs));
MemoryRegion code(&(*data)[0], data->size());
- assembler_->FinalizeInstructions(code);
+ assembler_->CopyInstructions(code);
Pad(*data);
Driver(*data, assembly_text, test_name);
}