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/x86_memory_gen.cc b/compiler/optimizing/x86_memory_gen.cc
index 4e25683..0271850 100644
--- a/compiler/optimizing/x86_memory_gen.cc
+++ b/compiler/optimizing/x86_memory_gen.cc
@@ -41,7 +41,7 @@
     }
 
     HInstruction* array = array_len->InputAt(0);
-    DCHECK_EQ(array->GetType(), Primitive::kPrimNot);
+    DCHECK_EQ(array->GetType(), DataType::Type::kReference);
 
     // Don't apply this optimization when the array is nullptr.
     if (array->IsConstant() || (array->IsNullCheck() && array->InputAt(0)->IsConstant())) {