Revert "Revert "Make libdexfile build independent of runtime dir""

This reverts commit 787784f9effb126b5d0d3dc97d544c4a477b5daf.

Reason for revert: Bot configuration issue.

Change-Id: I6a10bb4a9571f89c7e4dd095f9157e830a44e2de
Bug: 22322814
Test: make -j 50 checkbuild
diff --git a/openjdkjvmti/ti_method.cc b/openjdkjvmti/ti_method.cc
index 3f144c8..83d64ef 100644
--- a/openjdkjvmti/ti_method.cc
+++ b/openjdkjvmti/ti_method.cc
@@ -123,7 +123,7 @@
   }
 
   art::ScopedObjectAccess soa(art::Thread::Current());
-  art::CodeItemInstructionAccessor accessor(art_method);
+  art::CodeItemInstructionAccessor accessor(art_method->DexInstructions());
   if (!accessor.HasCodeItem()) {
     *size_ptr = 0;
     *bytecode_ptr = nullptr;
@@ -168,7 +168,7 @@
   }
 
   DCHECK_NE(art_method->GetCodeItemOffset(), 0u);
-  *size_ptr = art::CodeItemDataAccessor(art_method).InsSize();
+  *size_ptr = art_method->DexInstructionData().InsSize();
 
   return ERR(NONE);
 }
@@ -200,7 +200,7 @@
   // TODO HasCodeItem == false means that the method is abstract (or native, but we check that
   // earlier). We should check what is returned by the RI in this situation since it's not clear
   // what the appropriate return value is from the spec.
-  art::CodeItemDebugInfoAccessor accessor(art_method);
+  art::CodeItemDebugInfoAccessor accessor(art_method->DexInstructionDebugInfo());
   if (!accessor.HasCodeItem()) {
     return ERR(ABSENT_INFORMATION);
   }
@@ -301,7 +301,7 @@
   }
 
   DCHECK_NE(art_method->GetCodeItemOffset(), 0u);
-  *max_ptr = art::CodeItemDataAccessor(art_method).RegistersSize();
+  *max_ptr = art_method->DexInstructionData().RegistersSize();
 
   return ERR(NONE);
 }
@@ -480,7 +480,7 @@
       return ERR(NULL_POINTER);
     }
 
-    accessor = art::CodeItemDebugInfoAccessor(art_method);
+    accessor = art::CodeItemDebugInfoAccessor(art_method->DexInstructionDebugInfo());
     dex_file = art_method->GetDexFile();
     DCHECK(accessor.HasCodeItem()) << art_method->PrettyMethod() << " " << dex_file->GetLocation();
   }
@@ -567,7 +567,7 @@
       // TODO It might be useful to fake up support for get at least on proxy frames.
       result_ = ERR(OPAQUE_FRAME);
       return;
-    } else if (art::CodeItemDataAccessor(method).RegistersSize() <= slot_) {
+    } else if (method->DexInstructionData().RegistersSize() <= slot_) {
       result_ = ERR(INVALID_SLOT);
       return;
     }
@@ -618,7 +618,7 @@
     if (dex_file == nullptr) {
       return ERR(OPAQUE_FRAME);
     }
-    art::CodeItemDebugInfoAccessor accessor(method);
+    art::CodeItemDebugInfoAccessor accessor(method->DexInstructionDebugInfo());
     if (!accessor.HasCodeItem()) {
       return ERR(OPAQUE_FRAME);
     }