Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 60) sorted by relevance

123

/art/test/096-array-copy-concurrent-gc/src/
DMain.java45 Object [] array = new Object[10000]; field in Main
54 for (int i = 0; i < array.length; i+=2) { in stressArray()
55 array[i] = new String("Creating some garbage" + i); in stressArray()
62 for (int j = 0; j < array.length; j++) { in stressArray()
63 Object obj = array[array.length - 1]; in stressArray()
64 System.arraycopy(array, 0, array, 1, array.length - 1); in stressArray()
65 array[0] = obj; in stressArray()
72 for (int j = 0; j < array.length; j++) { in stressArray()
73 Object obj = array[0]; in stressArray()
74 System.arraycopy(array, 1, array, 0, array.length - 1); in stressArray()
[all …]
/art/test/045-reflect-array/src/
DMain.java29 int[] array = (int[]) intArray; in testSingleInt() local
30 array[0] = 5; in testSingleInt()
35 if (array[1] != 6) in testSingleInt()
38 array[2] = 27; in testSingleInt()
45 if (array.length != Array.getLength(intArray) || in testSingleInt()
46 array.length != 2) in testSingleInt()
75 char[] array = (char[]) charArray; in testSingleChar() local
76 array[0] = '0'; in testSingleChar()
77 array[1] = 'W'; in testSingleChar()
78 array[2] = '2'; in testSingleChar()
[all …]
/art/runtime/entrypoints/quick/
Dquick_fillarray_entrypoints.cc40 extern "C" int artHandleFillArrayDataFromCode(mirror::Array* array, in artHandleFillArrayDataFromCode() argument
46 if (UNLIKELY(array == NULL)) { in artHandleFillArrayDataFromCode()
50 DCHECK(array->IsArrayInstance() && !array->IsObjectArray()); in artHandleFillArrayDataFromCode()
51 if (UNLIKELY(static_cast<int32_t>(payload->element_count) > array->GetLength())) { in artHandleFillArrayDataFromCode()
55 array->GetLength(), payload->element_count - 1); in artHandleFillArrayDataFromCode()
59 memcpy(array->GetRawData(payload->element_width, 0), payload->data, size_in_bytes); in artHandleFillArrayDataFromCode()
/art/runtime/entrypoints/portable/
Dportable_fillarray_entrypoints.cc26 mirror::Array* array, in art_portable_fill_array_data_from_code() argument
33 if (UNLIKELY(array == NULL)) { in art_portable_fill_array_data_from_code()
37 DCHECK(array->IsArrayInstance() && !array->IsObjectArray()); in art_portable_fill_array_data_from_code()
38 if (UNLIKELY(static_cast<int32_t>(payload->element_count) > array->GetLength())) { in art_portable_fill_array_data_from_code()
43 array->GetLength(), payload->element_count - 1); in art_portable_fill_array_data_from_code()
47 memcpy(array->GetRawData(payload->element_width, 0), payload->data, size_in_bytes); in art_portable_fill_array_data_from_code()
Dportable_cast_entrypoints.cc42 mirror::Object* array) in art_portable_check_put_array_element_from_code() argument
47 DCHECK(array != NULL); in art_portable_check_put_array_element_from_code()
48 mirror::Class* array_class = array->GetClass(); in art_portable_check_put_array_element_from_code()
/art/test/011-array-copy/src/
DMain.java51 static void initByteArray(byte[] array) { in initByteArray() argument
53 array[i] = (byte) i; in initByteArray()
56 static void initShortArray(short[] array) { in initShortArray() argument
58 array[i] = (short) i; in initShortArray()
61 static void initIntArray(int[] array) { in initIntArray() argument
63 array[i] = (int) i; in initIntArray()
66 static void initLongArray(long[] array) { in initLongArray() argument
68 array[i] = (long) i; in initLongArray()
/art/test/049-show-object/src/
DMain.java41 Object[] array = new Object[5]; in main() local
42 showObject(array); in main()
45 array = niftyStrings; in main()
46 showObject(array); in main()
/art/test/407-arrays/src/
DMain.java98 public static void ensureThrows(boolean[] array, int index) { in ensureThrows() argument
101 $opt$doArrayLoad(array, index); in ensureThrows()
111 $opt$doArrayStore(array, index); in ensureThrows()
120 public static void $opt$doArrayLoad(boolean[] array, int index) { in $opt$doArrayLoad() argument
121 boolean res = array[index]; in $opt$doArrayLoad()
124 public static void $opt$doArrayStore(boolean[] array, int index) { in $opt$doArrayStore() argument
125 array[index] = false; in $opt$doArrayStore()
/art/compiler/utils/
Darray_ref.h65 constexpr ArrayRef(T (&array)[size]) in ArrayRef()
66 : array_(array), size_(size) { in ArrayRef()
70 constexpr ArrayRef(U (&array)[size],
72 : array_(array), size_(size) { in array_() argument
75 constexpr ArrayRef(T* array, size_t size) in ArrayRef() argument
76 : array_(array), size_(size) { in ArrayRef()
80 constexpr ArrayRef(U* array, size_t size,
82 : array_(array), size_(size) { in array_() argument
/art/runtime/
Dtransaction.cc84 void Transaction::RecordWriteArray(mirror::Array* array, size_t index, uint64_t value) { in RecordWriteArray() argument
85 DCHECK(array != nullptr); in RecordWriteArray()
86 DCHECK(array->IsArrayInstance()); in RecordWriteArray()
87 DCHECK(!array->IsObjectArray()); in RecordWriteArray()
89 ArrayLog& array_log = array_logs_[array]; in RecordWriteArray()
377 void Transaction::ArrayLog::Undo(mirror::Array* array) { in Undo() argument
378 DCHECK(array != nullptr); in Undo()
379 DCHECK(array->IsArrayInstance()); in Undo()
380 Primitive::Type type = array->GetClass()->GetComponentType()->GetPrimitiveType(); in Undo()
382 UndoArrayWrite(array, type, it.first, it.second); in Undo()
[all …]
Djni_internal.cc245 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
[all …]
Dclass_linker_test.cc108 Handle<mirror::Class> array( in AssertArrayClass() local
111 EXPECT_STREQ(component_type.c_str(), array->GetComponentType()->GetDescriptor(&temp)); in AssertArrayClass()
112 EXPECT_EQ(class_loader, array->GetClassLoader()); in AssertArrayClass()
113 EXPECT_EQ(kAccFinal | kAccAbstract, (array->GetAccessFlags() & (kAccFinal | kAccAbstract))); in AssertArrayClass()
114 AssertArrayClass(array_descriptor, array); in AssertArrayClass()
117 void AssertArrayClass(const std::string& array_descriptor, Handle<mirror::Class> array) in AssertArrayClass() argument
119 ASSERT_TRUE(array.Get() != NULL); in AssertArrayClass()
120 ASSERT_TRUE(array->GetClass() != NULL); in AssertArrayClass()
121 ASSERT_EQ(array->GetClass(), array->GetClass()->GetClass()); in AssertArrayClass()
122 EXPECT_TRUE(array->GetClass()->GetSuperClass() != NULL); in AssertArrayClass()
[all …]
Djni_internal_test.cc684 jbooleanArray array = env_->NewBooleanArray(10); in TEST_F() local
686 EXPECT_EQ(env_->GetByteArrayElements(reinterpret_cast<jbyteArray>(array), &is_copy), nullptr); in TEST_F()
689 EXPECT_EQ(env_->GetShortArrayElements(reinterpret_cast<jshortArray>(array), &is_copy), nullptr); in TEST_F()
692 EXPECT_EQ(env_->GetCharArrayElements(reinterpret_cast<jcharArray>(array), &is_copy), nullptr); in TEST_F()
695 EXPECT_EQ(env_->GetIntArrayElements(reinterpret_cast<jintArray>(array), &is_copy), nullptr); in TEST_F()
698 EXPECT_EQ(env_->GetLongArrayElements(reinterpret_cast<jlongArray>(array), &is_copy), nullptr); in TEST_F()
701 EXPECT_EQ(env_->GetFloatArrayElements(reinterpret_cast<jfloatArray>(array), &is_copy), nullptr); in TEST_F()
704 EXPECT_EQ(env_->GetDoubleArrayElements(reinterpret_cast<jdoubleArray>(array), &is_copy), nullptr); in TEST_F()
721 jbooleanArray array = env_->NewBooleanArray(10); in TEST_F() local
722 ASSERT_TRUE(array != nullptr); in TEST_F()
[all …]
Dcheck_jni.cc1547 static jsize GetArrayLength(JNIEnv* env, jarray array) { in GetArrayLength() argument
1548 CHECK_JNI_ENTRY(kFlag_CritOkay, "Ea", env, array); in GetArrayLength()
1549 return CHECK_JNI_EXIT("I", baseEnv(env)->GetArrayLength(env, array)); in GetArrayLength()
1557 static jobject GetObjectArrayElement(JNIEnv* env, jobjectArray array, jsize index) { in GetObjectArrayElement() argument
1558 CHECK_JNI_ENTRY(kFlag_Default, "EaI", env, array, index); in GetObjectArrayElement()
1559 return CHECK_JNI_EXIT("L", baseEnv(env)->GetObjectArrayElement(env, array, index)); in GetObjectArrayElement()
1562 static void SetObjectArrayElement(JNIEnv* env, jobjectArray array, jsize index, jobject value) { in SetObjectArrayElement() argument
1563 CHECK_JNI_ENTRY(kFlag_Default, "EaIL", env, array, index, value); in SetObjectArrayElement()
1564 baseEnv(env)->SetObjectArrayElement(env, array, index, value); in SetObjectArrayElement()
1594 ResultT Check(JNIEnv* env, jarray array, jboolean* isCopy, ResultT result) { in Check()
[all …]
/art/runtime/mirror/
Dstring.cc84 CharArray* array = const_cast<CharArray*>(string->GetCharArray()); in AllocFromUtf16() local
85 if (UNLIKELY(array == nullptr)) { in AllocFromUtf16()
88 memcpy(array->GetData(), utf16_data_in, utf16_length * sizeof(uint16_t)); in AllocFromUtf16()
119 Handle<CharArray> array(hs.NewHandle(CharArray::Alloc(self, utf16_length))); in Alloc() local
120 if (UNLIKELY(array.Get() == nullptr)) { in Alloc()
123 return Alloc(self, array); in Alloc()
126 String* String::Alloc(Thread* self, Handle<CharArray> array) { in Alloc() argument
130 string->SetArray(array.Get()); in Alloc()
131 string->SetCount(array->GetLength()); in Alloc()
/art/test/106-exceptions2/src/
DMain.java155 static void throwImplicitAIOBE(int[] array, int index) { in throwImplicitAIOBE() argument
156 array[index] = 0; in throwImplicitAIOBE()
160 int[] array = new int[10]; in checkAIOBE() local
163 throwImplicitAIOBE(array, 11); in checkAIOBE()
171 throwImplicitAIOBE(array, -1); in checkAIOBE()
/art/test/058-enum-order/src/
DMain.java26 Muffin[] array = Muffin.class.getEnumConstants(); in main() local
27 for (Muffin m : array) { in main()
/art/test/081-hot-exceptions/src/
DMain.java19 int[] array; field in Main.ArrayObj
22 return array[i]; in getArrayElement()
/art/runtime/interpreter/
Dinterpreter_goto_table_impl.cc525 Object* array = shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data)); in ExecuteGotoImpl() local
526 if (UNLIKELY(array == NULL)) { in ExecuteGotoImpl()
530 shadow_frame.SetVReg(inst->VRegA_12x(inst_data), array->AsArray()->GetLength()); in ExecuteGotoImpl()
594 Array* array = obj->AsArray(); in ExecuteGotoImpl() local
595 DCHECK(array->IsArrayInstance() && !array->IsObjectArray()); in ExecuteGotoImpl()
599 if (UNLIKELY(static_cast<int32_t>(payload->element_count) > array->GetLength())) { in ExecuteGotoImpl()
603 array->GetLength(), payload->element_count); in ExecuteGotoImpl()
607 RecordArrayElementsInTransaction(array, payload->element_count); in ExecuteGotoImpl()
610 memcpy(array->GetRawData(payload->element_width, 0), payload->data, size_in_bytes); in ExecuteGotoImpl()
974 BooleanArray* array = a->AsBooleanArray(); in ExecuteGotoImpl() local
[all …]
Dinterpreter_switch_impl.cc438 Object* array = shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data)); in ExecuteSwitchImpl() local
439 if (UNLIKELY(array == NULL)) { in ExecuteSwitchImpl()
443 shadow_frame.SetVReg(inst->VRegA_12x(inst_data), array->AsArray()->GetLength()); in ExecuteSwitchImpl()
509 Array* array = obj->AsArray(); in ExecuteSwitchImpl() local
510 DCHECK(array->IsArrayInstance() && !array->IsObjectArray()); in ExecuteSwitchImpl()
514 if (UNLIKELY(static_cast<int32_t>(payload->element_count) > array->GetLength())) { in ExecuteSwitchImpl()
518 array->GetLength(), payload->element_count); in ExecuteSwitchImpl()
523 RecordArrayElementsInTransaction(array, payload->element_count); in ExecuteSwitchImpl()
526 memcpy(array->GetRawData(payload->element_width, 0), payload->data, size_in_bytes); in ExecuteSwitchImpl()
873 BooleanArray* array = a->AsBooleanArray(); in ExecuteSwitchImpl() local
[all …]
/art/test/303-verification-stress/
Dinfo.txt2 classes, each one initializing a big array of string in its class initializer.
7 size of string array can be modified in the script.
/art/compiler/dex/
Dlocal_value_numbering.h140 uint16_t array; member
145 return array == other.array && index == other.index;
151 if (lhs.array != rhs.array) { in operator()
152 return lhs.array < rhs.array; in operator()
300 void HandleRangeCheck(MIR* mir, uint16_t array, uint16_t index);
Dlocal_value_numbering.cc111 uint16_t array) { in StartMemoryVersion() argument
112 return gvn->LookupValue(kNonAliasingArrayStartVersionOp, array, kNoValue, kNoValue); in StartMemoryVersion()
122 uint16_t array, uint16_t index, uint16_t memory_version) { in LookupGlobalValue() argument
123 return gvn->LookupValue(kNonAliasingArrayOp, array, index, memory_version); in LookupGlobalValue()
127 uint16_t array, uint16_t index) { in LookupMergeValue() argument
129 gvn, lvn, &lvn->non_aliasing_array_value_map_, array, index); in LookupMergeValue()
133 uint16_t array) { in HasNewBaseVersion() argument
138 uint16_t array) { in LookupMergeBlockValue() argument
139 return gvn->LookupValue(kMergeBlockNonAliasingArrayVersionBumpOp, array, kNoValue, lvn_id); in LookupMergeBlockValue()
143 uint16_t array, uint16_t index) { in LookupMergeLocationValue() argument
[all …]
/art/test/201-built-in-exception-detail-messages/src/
DMain.java105 Object[] array = new String[10]; in arrayStore() local
107 array[0] = o; in arrayStore()
115 Object[] array = new C[10][]; in arrayStore() local
117 array[0] = o; in arrayStore()
125 Object[] array = new Float[10][]; in arrayStore() local
127 array[0] = o; in arrayStore()
/art/runtime/base/
Dmacros.h97 char (&ArraySizeHelper(T (&array)[N]))[N];
99 #define arraysize(array) (sizeof(ArraySizeHelper(array))) argument

123