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/emit_swap_mips_test.cc b/compiler/optimizing/emit_swap_mips_test.cc
index fa3c4df..0e9c81d 100644
--- a/compiler/optimizing/emit_swap_mips_test.cc
+++ b/compiler/optimizing/emit_swap_mips_test.cc
@@ -118,12 +118,12 @@
   moves_->AddMove(
       Location::RegisterLocation(4),
       Location::RegisterLocation(5),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   moves_->AddMove(
       Location::RegisterLocation(5),
       Location::RegisterLocation(4),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   const char* expected =
       "or $t8, $a1, $zero\n"
@@ -136,12 +136,12 @@
   moves_->AddMove(
       Location::RegisterPairLocation(4, 5),
       Location::RegisterPairLocation(6, 7),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   moves_->AddMove(
       Location::RegisterPairLocation(6, 7),
       Location::RegisterPairLocation(4, 5),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   const char* expected =
       "or $t8, $a2, $zero\n"
@@ -157,12 +157,12 @@
   moves_->AddMove(
       Location::FpuRegisterLocation(4),
       Location::FpuRegisterLocation(2),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   moves_->AddMove(
       Location::FpuRegisterLocation(2),
       Location::FpuRegisterLocation(4),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   const char* expected =
       "mov.s $f6, $f2\n"
@@ -175,12 +175,12 @@
   moves_->AddMove(
       Location::FpuRegisterLocation(4),
       Location::FpuRegisterLocation(2),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   moves_->AddMove(
       Location::FpuRegisterLocation(2),
       Location::FpuRegisterLocation(4),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   const char* expected =
       "mov.d $f6, $f2\n"
@@ -193,12 +193,12 @@
   moves_->AddMove(
       Location::RegisterLocation(4),
       Location::FpuRegisterLocation(2),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   moves_->AddMove(
       Location::FpuRegisterLocation(2),
       Location::RegisterLocation(4),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   const char* expected =
       "or $t8, $a0, $zero\n"
@@ -211,12 +211,12 @@
   moves_->AddMove(
       Location::RegisterPairLocation(4, 5),
       Location::FpuRegisterLocation(4),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   moves_->AddMove(
       Location::FpuRegisterLocation(4),
       Location::RegisterPairLocation(4, 5),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   const char* expected =
       "mfc1 $t8, $f4\n"
@@ -232,12 +232,12 @@
   moves_->AddMove(
       Location::StackSlot(52),
       Location::StackSlot(48),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   moves_->AddMove(
       Location::StackSlot(48),
       Location::StackSlot(52),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   const char* expected =
       "addiu $sp, $sp, -4\n"
@@ -255,12 +255,12 @@
   moves_->AddMove(
       Location::DoubleStackSlot(56),
       Location::DoubleStackSlot(48),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   moves_->AddMove(
       Location::DoubleStackSlot(48),
       Location::DoubleStackSlot(56),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   const char* expected =
       "addiu $sp, $sp, -4\n"
@@ -282,12 +282,12 @@
   moves_->AddMove(
       Location::RegisterLocation(4),
       Location::StackSlot(48),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   moves_->AddMove(
       Location::StackSlot(48),
       Location::RegisterLocation(4),
-      Primitive::kPrimInt,
+      DataType::Type::kInt32,
       nullptr);
   const char* expected =
       "or $t8, $a0, $zero\n"
@@ -300,12 +300,12 @@
   moves_->AddMove(
       Location::RegisterPairLocation(4, 5),
       Location::DoubleStackSlot(32),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   moves_->AddMove(
       Location::DoubleStackSlot(32),
       Location::RegisterPairLocation(4, 5),
-      Primitive::kPrimLong,
+      DataType::Type::kInt64,
       nullptr);
   const char* expected =
       "or $t8, $a0, $zero\n"
@@ -321,12 +321,12 @@
   moves_->AddMove(
       Location::FpuRegisterLocation(4),
       Location::StackSlot(48),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   moves_->AddMove(
       Location::StackSlot(48),
       Location::FpuRegisterLocation(4),
-      Primitive::kPrimFloat,
+      DataType::Type::kFloat32,
       nullptr);
   const char* expected =
       "mov.s $f6, $f4\n"
@@ -339,12 +339,12 @@
   moves_->AddMove(
       Location::FpuRegisterLocation(4),
       Location::DoubleStackSlot(48),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   moves_->AddMove(
       Location::DoubleStackSlot(48),
       Location::FpuRegisterLocation(4),
-      Primitive::kPrimDouble,
+      DataType::Type::kFloat64,
       nullptr);
   const char* expected =
       "mov.d $f6, $f4\n"