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-inl.h b/runtime/handle_scope-inl.h
index 75a0391..1814746 100644
--- a/runtime/handle_scope-inl.h
+++ b/runtime/handle_scope-inl.h
@@ -135,6 +135,12 @@
GetReferences()[i].Assign(object);
}
+template<class MirrorType, bool kPoison>
+inline MutableHandle<MirrorType> StackHandleScopeCollection::NewHandle(
+ ObjPtr<MirrorType, kPoison> ptr) {
+ return NewHandle(ptr.Decode());
+}
+
} // namespace art
#endif // ART_RUNTIME_HANDLE_SCOPE_INL_H_