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/verifier/verifier_deps.cc b/runtime/verifier/verifier_deps.cc
index 350c838..3e1958f 100644
--- a/runtime/verifier/verifier_deps.cc
+++ b/runtime/verifier/verifier_deps.cc
@@ -19,6 +19,7 @@
#include "compiler_callbacks.h"
#include "leb128.h"
#include "mirror/class-inl.h"
+#include "obj_ptr-inl.h"
#include "runtime.h"
namespace art {
@@ -107,10 +108,10 @@
}
}
-bool VerifierDeps::IsInClassPath(mirror::Class* klass) {
+bool VerifierDeps::IsInClassPath(ObjPtr<mirror::Class> klass) {
DCHECK(klass != nullptr);
- mirror::DexCache* dex_cache = klass->GetDexCache();
+ ObjPtr<mirror::DexCache> dex_cache = klass->GetDexCache();
if (dex_cache == nullptr) {
// This is a synthesized class, in this case always an array. They are not
// defined in the compiled DEX files and therefore are part of the classpath.