Lines Matching refs:array

245 static void ThrowAIOOBE(ScopedObjectAccess& soa, mirror::Array* array, jsize start,  in ThrowAIOOBE()  argument
248 std::string type(PrettyTypeOf(array)); in ThrowAIOOBE()
252 type.c_str(), start, length, identifier, array->GetLength()); in ThrowAIOOBE()
2070 mirror::Array* array = obj->AsArray(); in GetArrayLength() local
2071 return array->GetLength(); in GetArrayLength()
2077 mirror::ObjectArray<mirror::Object>* array = in GetObjectArrayElement() local
2079 return soa.AddLocalReference<jobject>(array->Get(index)); in GetObjectArrayElement()
2086 mirror::ObjectArray<mirror::Object>* array = in SetObjectArrayElement() local
2089 array->Set<false>(index, value); in SetObjectArrayElement()
2174 mirror::Array* array = soa.Decode<mirror::Array*>(java_array); in GetPrimitiveArrayCritical() local
2175 if (UNLIKELY(!array->GetClass()->IsPrimitiveArray())) { in GetPrimitiveArrayCritical()
2177 PrettyDescriptor(array->GetClass()).c_str()); in GetPrimitiveArrayCritical()
2181 if (heap->IsMovableObject(array)) { in GetPrimitiveArrayCritical()
2184 array = soa.Decode<mirror::Array*>(java_array); in GetPrimitiveArrayCritical()
2189 return array->GetRawData(array->GetClass()->GetComponentSize(), 0); in GetPrimitiveArrayCritical()
2196 mirror::Array* array = soa.Decode<mirror::Array*>(java_array); in ReleasePrimitiveArrayCritical() local
2197 if (UNLIKELY(!array->GetClass()->IsPrimitiveArray())) { in ReleasePrimitiveArrayCritical()
2199 PrettyDescriptor(array->GetClass()).c_str()); in ReleasePrimitiveArrayCritical()
2202 const size_t component_size = array->GetClass()->GetComponentSize(); in ReleasePrimitiveArrayCritical()
2203 ReleasePrimitiveArray(soa, array, component_size, elements, mode); in ReleasePrimitiveArrayCritical()
2206 static jboolean* GetBooleanArrayElements(JNIEnv* env, jbooleanArray array, jboolean* is_copy) { in GetBooleanArrayElements() argument
2207 return GetPrimitiveArray<jbooleanArray, jboolean, mirror::BooleanArray>(env, array, is_copy); in GetBooleanArrayElements()
2210 static jbyte* GetByteArrayElements(JNIEnv* env, jbyteArray array, jboolean* is_copy) { in GetByteArrayElements() argument
2211 return GetPrimitiveArray<jbyteArray, jbyte, mirror::ByteArray>(env, array, is_copy); in GetByteArrayElements()
2214 static jchar* GetCharArrayElements(JNIEnv* env, jcharArray array, jboolean* is_copy) { in GetCharArrayElements() argument
2215 return GetPrimitiveArray<jcharArray, jchar, mirror::CharArray>(env, array, is_copy); in GetCharArrayElements()
2218 static jdouble* GetDoubleArrayElements(JNIEnv* env, jdoubleArray array, jboolean* is_copy) { in GetDoubleArrayElements() argument
2219 return GetPrimitiveArray<jdoubleArray, jdouble, mirror::DoubleArray>(env, array, is_copy); in GetDoubleArrayElements()
2222 static jfloat* GetFloatArrayElements(JNIEnv* env, jfloatArray array, jboolean* is_copy) { in GetFloatArrayElements() argument
2223 return GetPrimitiveArray<jfloatArray, jfloat, mirror::FloatArray>(env, array, is_copy); in GetFloatArrayElements()
2226 static jint* GetIntArrayElements(JNIEnv* env, jintArray array, jboolean* is_copy) { in GetIntArrayElements() argument
2227 return GetPrimitiveArray<jintArray, jint, mirror::IntArray>(env, array, is_copy); in GetIntArrayElements()
2230 static jlong* GetLongArrayElements(JNIEnv* env, jlongArray array, jboolean* is_copy) { in GetLongArrayElements() argument
2231 return GetPrimitiveArray<jlongArray, jlong, mirror::LongArray>(env, array, is_copy); in GetLongArrayElements()
2234 static jshort* GetShortArrayElements(JNIEnv* env, jshortArray array, jboolean* is_copy) { in GetShortArrayElements() argument
2235 return GetPrimitiveArray<jshortArray, jshort, mirror::ShortArray>(env, array, is_copy); in GetShortArrayElements()
2238 static void ReleaseBooleanArrayElements(JNIEnv* env, jbooleanArray array, jboolean* elements, in ReleaseBooleanArrayElements() argument
2240 ReleasePrimitiveArray<jbooleanArray, jboolean, mirror::BooleanArray>(env, array, elements, in ReleaseBooleanArrayElements()
2244 static void ReleaseByteArrayElements(JNIEnv* env, jbyteArray array, jbyte* elements, jint mode) { in ReleaseByteArrayElements() argument
2245 ReleasePrimitiveArray<jbyteArray, jbyte, mirror::ByteArray>(env, array, elements, mode); in ReleaseByteArrayElements()
2248 static void ReleaseCharArrayElements(JNIEnv* env, jcharArray array, jchar* elements, jint mode) { in ReleaseCharArrayElements() argument
2249 ReleasePrimitiveArray<jcharArray, jchar, mirror::CharArray>(env, array, elements, mode); in ReleaseCharArrayElements()
2252 static void ReleaseDoubleArrayElements(JNIEnv* env, jdoubleArray array, jdouble* elements, in ReleaseDoubleArrayElements() argument
2254 ReleasePrimitiveArray<jdoubleArray, jdouble, mirror::DoubleArray>(env, array, elements, mode); in ReleaseDoubleArrayElements()
2257 static void ReleaseFloatArrayElements(JNIEnv* env, jfloatArray array, jfloat* elements, in ReleaseFloatArrayElements() argument
2259 ReleasePrimitiveArray<jfloatArray, jfloat, mirror::FloatArray>(env, array, elements, mode); in ReleaseFloatArrayElements()
2262 static void ReleaseIntArrayElements(JNIEnv* env, jintArray array, jint* elements, jint mode) { in ReleaseIntArrayElements() argument
2263 ReleasePrimitiveArray<jintArray, jint, mirror::IntArray>(env, array, elements, mode); in ReleaseIntArrayElements()
2266 static void ReleaseLongArrayElements(JNIEnv* env, jlongArray array, jlong* elements, jint mode) { in ReleaseLongArrayElements() argument
2267 ReleasePrimitiveArray<jlongArray, jlong, mirror::LongArray>(env, array, elements, mode); in ReleaseLongArrayElements()
2270 static void ReleaseShortArrayElements(JNIEnv* env, jshortArray array, jshort* elements, in ReleaseShortArrayElements() argument
2272 ReleasePrimitiveArray<jshortArray, jshort, mirror::ShortArray>(env, array, elements, mode); in ReleaseShortArrayElements()
2275 static void GetBooleanArrayRegion(JNIEnv* env, jbooleanArray array, jsize start, jsize length, in GetBooleanArrayRegion() argument
2277 GetPrimitiveArrayRegion<jbooleanArray, jboolean, mirror::BooleanArray>(env, array, start, in GetBooleanArrayRegion()
2281 static void GetByteArrayRegion(JNIEnv* env, jbyteArray array, jsize start, jsize length, in GetByteArrayRegion() argument
2283 GetPrimitiveArrayRegion<jbyteArray, jbyte, mirror::ByteArray>(env, array, start, length, buf); in GetByteArrayRegion()
2286 static void GetCharArrayRegion(JNIEnv* env, jcharArray array, jsize start, jsize length, in GetCharArrayRegion() argument
2288 GetPrimitiveArrayRegion<jcharArray, jchar, mirror::CharArray>(env, array, start, length, buf); in GetCharArrayRegion()
2291 static void GetDoubleArrayRegion(JNIEnv* env, jdoubleArray array, jsize start, jsize length, in GetDoubleArrayRegion() argument
2293 GetPrimitiveArrayRegion<jdoubleArray, jdouble, mirror::DoubleArray>(env, array, start, length, in GetDoubleArrayRegion()
2297 static void GetFloatArrayRegion(JNIEnv* env, jfloatArray array, jsize start, jsize length, in GetFloatArrayRegion() argument
2299 GetPrimitiveArrayRegion<jfloatArray, jfloat, mirror::FloatArray>(env, array, start, length, in GetFloatArrayRegion()
2303 static void GetIntArrayRegion(JNIEnv* env, jintArray array, jsize start, jsize length, in GetIntArrayRegion() argument
2305 GetPrimitiveArrayRegion<jintArray, jint, mirror::IntArray>(env, array, start, length, buf); in GetIntArrayRegion()
2308 static void GetLongArrayRegion(JNIEnv* env, jlongArray array, jsize start, jsize length, in GetLongArrayRegion() argument
2310 GetPrimitiveArrayRegion<jlongArray, jlong, mirror::LongArray>(env, array, start, length, buf); in GetLongArrayRegion()
2313 static void GetShortArrayRegion(JNIEnv* env, jshortArray array, jsize start, jsize length, in GetShortArrayRegion() argument
2315 GetPrimitiveArrayRegion<jshortArray, jshort, mirror::ShortArray>(env, array, start, length, in GetShortArrayRegion()
2319 static void SetBooleanArrayRegion(JNIEnv* env, jbooleanArray array, jsize start, jsize length, in SetBooleanArrayRegion() argument
2321 SetPrimitiveArrayRegion<jbooleanArray, jboolean, mirror::BooleanArray>(env, array, start, in SetBooleanArrayRegion()
2325 static void SetByteArrayRegion(JNIEnv* env, jbyteArray array, jsize start, jsize length, in SetByteArrayRegion() argument
2327 SetPrimitiveArrayRegion<jbyteArray, jbyte, mirror::ByteArray>(env, array, start, length, buf); in SetByteArrayRegion()
2330 static void SetCharArrayRegion(JNIEnv* env, jcharArray array, jsize start, jsize length, in SetCharArrayRegion() argument
2332 SetPrimitiveArrayRegion<jcharArray, jchar, mirror::CharArray>(env, array, start, length, buf); in SetCharArrayRegion()
2335 static void SetDoubleArrayRegion(JNIEnv* env, jdoubleArray array, jsize start, jsize length, in SetDoubleArrayRegion() argument
2337 SetPrimitiveArrayRegion<jdoubleArray, jdouble, mirror::DoubleArray>(env, array, start, length, in SetDoubleArrayRegion()
2341 static void SetFloatArrayRegion(JNIEnv* env, jfloatArray array, jsize start, jsize length, in SetFloatArrayRegion() argument
2343 SetPrimitiveArrayRegion<jfloatArray, jfloat, mirror::FloatArray>(env, array, start, length, in SetFloatArrayRegion()
2347 static void SetIntArrayRegion(JNIEnv* env, jintArray array, jsize start, jsize length, in SetIntArrayRegion() argument
2349 SetPrimitiveArrayRegion<jintArray, jint, mirror::IntArray>(env, array, start, length, buf); in SetIntArrayRegion()
2352 static void SetLongArrayRegion(JNIEnv* env, jlongArray array, jsize start, jsize length, in SetLongArrayRegion() argument
2354 SetPrimitiveArrayRegion<jlongArray, jlong, mirror::LongArray>(env, array, start, length, buf); in SetLongArrayRegion()
2357 static void SetShortArrayRegion(JNIEnv* env, jshortArray array, jsize start, jsize length, in SetShortArrayRegion() argument
2359 SetPrimitiveArrayRegion<jshortArray, jshort, mirror::ShortArray>(env, array, start, length, in SetShortArrayRegion()
2593 ArtArrayT* array = soa.Decode<ArtArrayT*>(java_array); in DecodeAndCheckArrayType() local
2594 if (UNLIKELY(ArtArrayT::GetArrayClass() != array->GetClass())) { in DecodeAndCheckArrayType()
2597 PrettyDescriptor(array->GetClass()).c_str()); in DecodeAndCheckArrayType()
2600 DCHECK_EQ(sizeof(ElementT), array->GetClass()->GetComponentSize()); in DecodeAndCheckArrayType()
2601 return array; in DecodeAndCheckArrayType()
2608 ArtArrayT* array = DecodeAndCheckArrayType<ArrayT, ElementT, ArtArrayT>(soa, java_array, in GetPrimitiveArray() local
2611 if (UNLIKELY(array == nullptr)) { in GetPrimitiveArray()
2615 if (Runtime::Current()->GetHeap()->IsMovableObject(array)) { in GetPrimitiveArray()
2620 size_t size = array->GetLength() * component_size; in GetPrimitiveArray()
2622 memcpy(data, array->GetData(), size); in GetPrimitiveArray()
2628 return reinterpret_cast<ElementT*>(array->GetData()); in GetPrimitiveArray()
2636 ArtArrayT* array = DecodeAndCheckArrayType<ArrayT, ElementT, ArtArrayT>(soa, java_array, in ReleasePrimitiveArray() local
2639 if (array == nullptr) { in ReleasePrimitiveArray()
2642 ReleasePrimitiveArray(soa, array, sizeof(ElementT), elements, mode); in ReleasePrimitiveArray()
2645 static void ReleasePrimitiveArray(ScopedObjectAccess& soa, mirror::Array* array, in ReleasePrimitiveArray() argument
2648 void* array_data = array->GetRawData(component_size, 0); in ReleasePrimitiveArray()
2651 size_t bytes = array->GetLength() * component_size; in ReleasePrimitiveArray()
2671 } else if (heap->IsMovableObject(array)) { in ReleasePrimitiveArray()
2683 ArtArrayT* array = in GetPrimitiveArrayRegion() local
2687 if (array != nullptr) { in GetPrimitiveArrayRegion()
2688 if (start < 0 || length < 0 || start + length > array->GetLength()) { in GetPrimitiveArrayRegion()
2689 ThrowAIOOBE(soa, array, start, length, "src"); in GetPrimitiveArrayRegion()
2692 ElementT* data = array->GetData(); in GetPrimitiveArrayRegion()
2703 ArtArrayT* array = in SetPrimitiveArrayRegion() local
2707 if (array != nullptr) { in SetPrimitiveArrayRegion()
2708 if (start < 0 || length < 0 || start + length > array->GetLength()) { in SetPrimitiveArrayRegion()
2709 ThrowAIOOBE(soa, array, start, length, "dst"); in SetPrimitiveArrayRegion()
2712 ElementT* data = array->GetData(); in SetPrimitiveArrayRegion()