Infrastructure for obsolete methods
This adds some of the structures and functions needed to eventually
support obsolete methods. Specifically this adds the code to create
and iterate through the obsolete dex-cache maps of classes and
re-organizes the redefinition code to be more sensible and extensible.
Bug: 32369913
Test: ./test/run-test --host 902
Test: mma -j40 test-art-host
Change-Id: I93d60fa66e7512e8b059cdf42af8a56e93ef4bd7
diff --git a/runtime/handle.h b/runtime/handle.h
index 3db3be2..e4b6d29 100644
--- a/runtime/handle.h
+++ b/runtime/handle.h
@@ -61,6 +61,10 @@
return down_cast<T*>(reference_->AsMirrorPtr());
}
+ ALWAYS_INLINE bool IsNull() const REQUIRES_SHARED(Locks::mutator_lock_) {
+ return Get() == nullptr;
+ }
+
ALWAYS_INLINE jobject ToJObject() const REQUIRES_SHARED(Locks::mutator_lock_) {
if (UNLIKELY(reference_->AsMirrorPtr() == nullptr)) {
// Special case so that we work with null handles.