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/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index b46060a..e89bf6d 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -70,7 +70,7 @@
 
 TEST_F(SsaLivenessAnalysisTest, TestReturnArg) {
   HInstruction* arg = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(0), 0, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32);
   entry_->AddInstruction(arg);
 
   HBasicBlock* block = CreateSuccessor(entry_);
@@ -90,15 +90,15 @@
 
 TEST_F(SsaLivenessAnalysisTest, TestAput) {
   HInstruction* array = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(0), 0, Primitive::kPrimNot);
+      graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
   HInstruction* index = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(1), 1, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(1), 1, DataType::Type::kInt32);
   HInstruction* value = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(2), 2, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(2), 2, DataType::Type::kInt32);
   HInstruction* extra_arg1 = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(3), 3, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(3), 3, DataType::Type::kInt32);
   HInstruction* extra_arg2 = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(4), 4, Primitive::kPrimNot);
+      graph_->GetDexFile(), dex::TypeIndex(4), 4, DataType::Type::kReference);
   ArenaVector<HInstruction*> args({ array, index, value, extra_arg1, extra_arg2 },
                                   allocator_.Adapter());
   for (HInstruction* insn : args) {
@@ -127,7 +127,7 @@
   bounds_check_env->CopyFrom(args);
   bounds_check->SetRawEnvironment(bounds_check_env);
   HInstruction* array_set =
-      new (&allocator_) HArraySet(array, index, value, Primitive::kPrimInt, /* dex_pc */ 0);
+      new (&allocator_) HArraySet(array, index, value, DataType::Type::kInt32, /* dex_pc */ 0);
   block->AddInstruction(array_set);
 
   graph_->BuildDominatorTree();
@@ -160,15 +160,15 @@
 
 TEST_F(SsaLivenessAnalysisTest, TestDeoptimize) {
   HInstruction* array = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(0), 0, Primitive::kPrimNot);
+      graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
   HInstruction* index = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(1), 1, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(1), 1, DataType::Type::kInt32);
   HInstruction* value = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(2), 2, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(2), 2, DataType::Type::kInt32);
   HInstruction* extra_arg1 = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(3), 3, Primitive::kPrimInt);
+      graph_->GetDexFile(), dex::TypeIndex(3), 3, DataType::Type::kInt32);
   HInstruction* extra_arg2 = new (&allocator_) HParameterValue(
-      graph_->GetDexFile(), dex::TypeIndex(4), 4, Primitive::kPrimNot);
+      graph_->GetDexFile(), dex::TypeIndex(4), 4, DataType::Type::kReference);
   ArenaVector<HInstruction*> args({ array, index, value, extra_arg1, extra_arg2 },
                                   allocator_.Adapter());
   for (HInstruction* insn : args) {
@@ -201,7 +201,7 @@
   deoptimize_env->CopyFrom(args);
   deoptimize->SetRawEnvironment(deoptimize_env);
   HInstruction* array_set =
-      new (&allocator_) HArraySet(array, index, value, Primitive::kPrimInt, /* dex_pc */ 0);
+      new (&allocator_) HArraySet(array, index, value, DataType::Type::kInt32, /* dex_pc */ 0);
   block->AddInstruction(array_set);
 
   graph_->BuildDominatorTree();