Use accessor methods for Object fields.

Ensure that Object fields are modified via accessors so that it's easy
to insert barriers (make all fields within Objects private). Add validity
checks to Field and Method accessors to ensure they are accessed when a
Class is in a suitable state. Add validity checks to all Object
accessors to check heap isn't corrupted. Remove hacked in strings from Field
and Method; make type fields used the dex cache that is lazily initialized.
Clean up various other TODOs and lint issues.

Change-Id: Iac0afc515c01f5419874d9cdcdb9a7b45443e3fb
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 3d66909..c8e7c70 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -543,11 +543,11 @@
 int32_t DexFile::GetLineNumFromPC(const art::Method* method, uint32_t rel_pc) const {
   // For native method, lineno should be -2 to indicate it is native. Note that
   // "line number == -2" is how libcore tells from StackTraceElement.
-  if (method->code_off_ == 0) {
+  if (method->GetCodeItemOffset() == 0) {
     return -2;
   }
 
-  const CodeItem* code_item = GetCodeItem(method->code_off_);
+  const CodeItem* code_item = GetCodeItem(method->GetCodeItemOffset());
   DCHECK(code_item != NULL);
 
   // A method with no line number info should return -1
@@ -573,7 +573,7 @@
     arg_reg++;
   }
 
-  ParameterIterator *it = GetParameterIterator(GetProtoId(method->proto_idx_));
+  ParameterIterator *it = GetParameterIterator(GetProtoId(method->GetProtoIdx()));
   for (uint32_t i = 0; i < parameters_size && it->HasNext(); ++i, it->Next()) {
     if (arg_reg >= code_item->registers_size_) {
       LOG(FATAL) << "invalid stream";