ART: Introduce compiler data type.
Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
diff --git a/compiler/optimizing/parallel_move_resolver.cc b/compiler/optimizing/parallel_move_resolver.cc
index be470cc..2036b4a 100644
--- a/compiler/optimizing/parallel_move_resolver.cc
+++ b/compiler/optimizing/parallel_move_resolver.cc
@@ -457,7 +457,7 @@
DCHECK_NE(kind, Location::kConstant);
Location scratch = AllocateScratchLocationFor(kind);
// We only care about the move size.
- Primitive::Type type = move->Is64BitMove() ? Primitive::kPrimLong : Primitive::kPrimInt;
+ DataType::Type type = move->Is64BitMove() ? DataType::Type::kInt64 : DataType::Type::kInt32;
// Perform (C -> scratch)
move->SetDestination(scratch);
EmitMove(index);
@@ -521,7 +521,8 @@
}
void ParallelMoveResolverNoSwap::AddPendingMove(Location source,
- Location destination, Primitive::Type type) {
+ Location destination,
+ DataType::Type type) {
pending_moves_.push_back(new (allocator_) MoveOperands(source, destination, type, nullptr));
}