ObjPtr<>-ify UnstartedRuntime, fix 2 stale reference uses.

Test: Rely on TreeHugger.
Bug: 31113334
Change-Id: I35f76c3e3b94dfca18dbe67aba065a1270f4e5ee
diff --git a/runtime/method_handles.h b/runtime/method_handles.h
index fce3d06..b6e3134 100644
--- a/runtime/method_handles.h
+++ b/runtime/method_handles.h
@@ -21,12 +21,13 @@
 
 #include "dex/dex_instruction.h"
 #include "handle.h"
-#include "interpreter/shadow_frame.h"
 #include "jvalue.h"
 #include "mirror/class.h"
 
 namespace art {
 
+class ShadowFrame;
+
 namespace mirror {
 class MethodHandle;
 class MethodType;
@@ -126,79 +127,6 @@
                         int32_t start_index,
                         int32_t end_index) REQUIRES_SHARED(Locks::mutator_lock_);
 
-// A convenience class that allows for iteration through a list of
-// input argument registers. This is used to iterate over input
-// arguments while performing standard argument conversions.
-class ShadowFrameGetter {
- public:
-  ShadowFrameGetter(const ShadowFrame& shadow_frame,
-                    const InstructionOperands* const operands,
-                    size_t operand_index = 0u)
-      : shadow_frame_(shadow_frame), operands_(operands), operand_index_(operand_index)  {}
-
-  ALWAYS_INLINE uint32_t Get() REQUIRES_SHARED(Locks::mutator_lock_) {
-    return shadow_frame_.GetVReg(Next());
-  }
-
-  ALWAYS_INLINE int64_t GetLong() REQUIRES_SHARED(Locks::mutator_lock_) {
-    return shadow_frame_.GetVRegLong(NextLong());
-  }
-
-  ALWAYS_INLINE ObjPtr<mirror::Object> GetReference() REQUIRES_SHARED(Locks::mutator_lock_) {
-    return shadow_frame_.GetVRegReference(Next());
-  }
-
- private:
-  uint32_t Next() {
-    const uint32_t next = operands_->GetOperand(operand_index_);
-    operand_index_ += 1;
-    return next;
-  }
-
-  uint32_t NextLong() {
-    const uint32_t next = operands_->GetOperand(operand_index_);
-    operand_index_ += 2;
-    return next;
-  }
-
-  const ShadowFrame& shadow_frame_;
-  const InstructionOperands* const operands_;  // the set of register operands to read
-  size_t operand_index_;  // the next register operand to read from frame
-};
-
-// A convenience class that allows values to be written to a given shadow frame,
-// starting at location |first_dst_reg|.
-class ShadowFrameSetter {
- public:
-  ShadowFrameSetter(ShadowFrame* shadow_frame, size_t first_dst_reg)
-      : shadow_frame_(shadow_frame), arg_index_(first_dst_reg) {}
-
-  ALWAYS_INLINE void Set(uint32_t value) REQUIRES_SHARED(Locks::mutator_lock_) {
-    DCHECK_LT(arg_index_, shadow_frame_->NumberOfVRegs());
-    shadow_frame_->SetVReg(arg_index_++, value);
-  }
-
-  ALWAYS_INLINE void SetReference(ObjPtr<mirror::Object> value)
-      REQUIRES_SHARED(Locks::mutator_lock_) {
-    DCHECK_LT(arg_index_, shadow_frame_->NumberOfVRegs());
-    shadow_frame_->SetVRegReference(arg_index_++, value.Ptr());
-  }
-
-  ALWAYS_INLINE void SetLong(int64_t value) REQUIRES_SHARED(Locks::mutator_lock_) {
-    DCHECK_LT(arg_index_, shadow_frame_->NumberOfVRegs());
-    shadow_frame_->SetVRegLong(arg_index_, value);
-    arg_index_ += 2;
-  }
-
-  ALWAYS_INLINE bool Done() const {
-    return arg_index_ == shadow_frame_->NumberOfVRegs();
-  }
-
- private:
-  ShadowFrame* shadow_frame_;
-  size_t arg_index_;
-};
-
 bool MethodHandleInvoke(Thread* self,
                         ShadowFrame& shadow_frame,
                         Handle<mirror::MethodHandle> method_handle,