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/mirror/array.h b/runtime/mirror/array.h
index 994e9b2..19d300e 100644
--- a/runtime/mirror/array.h
+++ b/runtime/mirror/array.h
@@ -208,6 +208,17 @@
typename Visitor>
void Fixup(mirror::PointerArray* dest, PointerSize pointer_size, const Visitor& visitor)
REQUIRES_SHARED(Locks::mutator_lock_);
+
+ // Works like memcpy(), except we guarantee not to allow tearing of array values (ie using smaller
+ // than element size copies). Arguments are assumed to be within the bounds of the array and the
+ // arrays non-null. Cannot be called in an active transaction.
+ template<bool kUnchecked = false>
+ void Memcpy(int32_t dst_pos,
+ ObjPtr<PointerArray> src,
+ int32_t src_pos,
+ int32_t count,
+ PointerSize pointer_size)
+ REQUIRES_SHARED(Locks::mutator_lock_);
};
} // namespace mirror