From a01de59eef990c07df9815376cd3c675e3acd481 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 15 Nov 2016 10:43:06 -0800 Subject: 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 --- runtime/mirror/array.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/mirror/array.h') diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 994e9b2616..19d300e1f4 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -208,6 +208,17 @@ class PointerArray : public Array { 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 + void Memcpy(int32_t dst_pos, + ObjPtr src, + int32_t src_pos, + int32_t count, + PointerSize pointer_size) + REQUIRES_SHARED(Locks::mutator_lock_); }; } // namespace mirror -- cgit v1.2.3-59-g8ed1b