Revert "Revert "Basic structural redefinition support""

This reverts commit 5a2301d897294ff4ee6de71f459dc2566dc3fa1a.

Bug: 134162467

Reason for revert: Relanding as unclear if issue is due to topic.

Change-Id: Ib1d1cf2e9132e30c9649b760ae9ae2d8ceacf843
diff --git a/openjdkjvmti/ti_heap.h b/openjdkjvmti/ti_heap.h
index bf6fce6..2e27cc7 100644
--- a/openjdkjvmti/ti_heap.h
+++ b/openjdkjvmti/ti_heap.h
@@ -19,6 +19,16 @@
 
 #include "jvmti.h"
 
+#include "base/locks.h"
+
+namespace art {
+class Thread;
+template<typename T> class ObjPtr;
+namespace mirror {
+class Object;
+}  // namespace mirror
+}  // namespace art
+
 namespace openjdkjvmti {
 
 class EventHandler;
@@ -78,6 +88,12 @@
 
   static jvmtiError JNICALL ChangeArraySize(jvmtiEnv* env, jobject arr, jsize new_size);
 
+  static void ReplaceReference(art::Thread* self,
+                               art::ObjPtr<art::mirror::Object> original,
+                               art::ObjPtr<art::mirror::Object> replacement)
+      REQUIRES(art::Locks::mutator_lock_,
+               art::Roles::uninterruptible_);
+
  private:
   static EventHandler* gEventHandler;
 };