Move ArtField to ObjPtr
Added EXPECT_OBJ_PTR_EQ and variants to gtests.
Fixed moving GC bugs in:
ClassLinker::CreatePathClassLoader
ClassLinkerTest: StaticFields
ObjPtr Decode call sites: 186 -> 181.
Some tests fail due to ResolvedFieldAccessTest, will fix in follow
up CL.
Bug: 31113334
Test: test-art-host CC baker
Change-Id: I8b266ad00f3c20c8cbe7cfdf280d175083df0b88
diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h
index 2b283ae..fc729a5 100644
--- a/runtime/handle_scope.h
+++ b/runtime/handle_scope.h
@@ -252,6 +252,10 @@
return scopes_.top()->NewHandle(object);
}
+ template<class MirrorType, bool kPoison>
+ MutableHandle<MirrorType> NewHandle(ObjPtr<MirrorType, kPoison> ptr)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
private:
static constexpr size_t kNumReferencesPerScope = 4;