ART: Add arraycopy(byte) to unstarted runtime
The byte-array version is now in use in libcore.
Allows to compile-time initialize:
* java.security.cert.X509CertSelector
* sun.security.pkcs.PKCS9Attribute
* sun.security.provider.certpath.AdaptableX509CertSelector
* sun.security.x509.AccessDescription
* sun.security.x509.AlgorithmId
* sun.security.x509.ExtendedKeyUsageExtension
* sun.security.x509.NetscapeCertTypeExtension
* sun.security.x509.OIDMap
* sun.security.x509.PKIXExtensions
Bug: 27265238
(cherry picked from commit cc44581beacd61a633b02a1223d1bf6fea278f94)
Change-Id: If6b680a455809152c9bd7a679a8ab430936c46a1
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 81be959..2f22ac4 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -427,6 +427,8 @@
dst_pos, src, src_pos, length, true /* throw_exception */);
}
}
+ } else if (src_type->IsPrimitiveByte()) {
+ PrimitiveArrayCopy<uint8_t>(self, src_array, src_pos, dst_array, dst_pos, length);
} else if (src_type->IsPrimitiveChar()) {
PrimitiveArrayCopy<uint16_t>(self, src_array, src_pos, dst_array, dst_pos, length);
} else if (src_type->IsPrimitiveInt()) {
@@ -437,6 +439,12 @@
}
}
+void UnstartedRuntime::UnstartedSystemArraycopyByte(
+ Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
+ // Just forward.
+ UnstartedRuntime::UnstartedSystemArraycopy(self, shadow_frame, result, arg_offset);
+}
+
void UnstartedRuntime::UnstartedSystemArraycopyChar(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
// Just forward.