Searched defs:array (Results 26 - 50 of 62) sorted by relevance

123

/art/runtime/
H A Dimage.cc153 auto* array = reinterpret_cast<LengthPrefixedArray<ArtField>*>(base + fields.Offset() + pos); local
154 for (size_t i = 0; i < array->size(); ++i) {
155 visitor->Visit(&array->At(i, sizeof(ArtField)));
157 pos += array->ComputeSize(array->size());
168 auto* array = reinterpret_cast<LengthPrefixedArray<ArtMethod>*>(base + methods.Offset() + pos); local
169 for (size_t i = 0; i < array->size(); ++i) {
170 visitor->Visit(&array->At(i, method_size, method_alignment));
172 pos += array->ComputeSize(array
[all...]
H A Dtransaction.cc159 void Transaction::RecordWriteArray(mirror::Array* array, size_t index, uint64_t value) { argument
160 DCHECK(array != nullptr);
161 DCHECK(array->IsArrayInstance());
162 DCHECK(!array->IsObjectArray());
164 ArrayLog& array_log = array_logs_[array];
215 // TODO we may not need to restore array allocated during this transaction. Or we could directly
283 // Update array logs with moving roots.
343 // Garbage collector needs to access object's class and array's length. So we don't rollback
491 void Transaction::ArrayLog::Undo(mirror::Array* array) { argument
492 DCHECK(array !
500 UndoArrayWrite(mirror::Array* array, Primitive::Type array_type, size_t index, uint64_t value) argument
[all...]
H A Dclass_linker_test.cc166 Handle<mirror::Class> array(
169 EXPECT_STREQ(component_type.c_str(), array->GetComponentType()->GetDescriptor(&temp));
170 EXPECT_EQ(class_loader, array->GetClassLoader());
171 EXPECT_EQ(kAccFinal | kAccAbstract, (array->GetAccessFlags() & (kAccFinal | kAccAbstract)));
172 AssertArrayClass(array_descriptor, array);
175 void AssertArrayClass(const std::string& array_descriptor, Handle<mirror::Class> array)
177 ASSERT_TRUE(array.Get() != nullptr);
178 ASSERT_TRUE(array->GetClass() != nullptr);
179 ASSERT_EQ(array->GetClass(), array
839 mirror::ObjectArray<mirror::String>* array = local
[all...]
H A Djni_internal_test.cc156 // But you must include it for an array of any reference type.
346 jbooleanArray array = env_->NewBooleanArray(10); local
348 EXPECT_EQ(env_->GetByteArrayElements(reinterpret_cast<jbyteArray>(array), &is_copy), nullptr);
350 check_jni ? "incompatible array type boolean[] expected byte[]"
351 : "attempt to get byte primitive array elements with an object of type boolean[]");
352 EXPECT_EQ(env_->GetShortArrayElements(reinterpret_cast<jshortArray>(array), &is_copy), nullptr);
354 check_jni ? "incompatible array type boolean[] expected short[]"
355 : "attempt to get short primitive array elements with an object of type boolean[]");
356 EXPECT_EQ(env_->GetCharArrayElements(reinterpret_cast<jcharArray>(array), &is_copy), nullptr);
358 check_jni ? "incompatible array typ
396 jbooleanArray array = env_->NewBooleanArray(10); local
441 jbyteArray array = env_->NewByteArray(10); local
484 jbooleanArray array = env_->NewBooleanArray(kLength); local
542 jbooleanArray array = env_->NewBooleanArray(kLength); local
1648 jobjectArray array = env_->NewObjectArray(1, java_lang_Class, nullptr); local
[all...]
/art/runtime/interpreter/
H A Dinterpreter_goto_table_impl.cc131 * For a fast handler table update, handler tables are stored in an array of handler tables. Each
133 * to an index in this array of handler tables ((see Instrumentation::GetInterpreterHandlerTable).
135 * Here's the current layout of this array of handler tables:
530 Object* array = shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data)); local
531 if (UNLIKELY(array == nullptr)) {
535 shadow_frame.SetVReg(inst->VRegA_12x(inst_data), array->AsArray()->GetLength());
1032 BooleanArray* array = a->AsBooleanArray(); local
1033 if (LIKELY(array->CheckIsValidIndex(index))) {
1034 shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
1050 ByteArray* array local
1068 CharArray* array = a->AsCharArray(); local
1086 ShortArray* array = a->AsShortArray(); local
1105 auto* array = down_cast<IntArray*>(a); local
1124 auto* array = down_cast<LongArray*>(a); local
1142 ObjectArray<Object>* array = a->AsObjectArray<Object>(); local
1161 BooleanArray* array = a->AsBooleanArray(); local
1180 ByteArray* array = a->AsByteArray(); local
1199 CharArray* array = a->AsCharArray(); local
1218 ShortArray* array = a->AsShortArray(); local
1238 auto* array = down_cast<IntArray*>(a); local
1258 auto* array = down_cast<LongArray*>(a); local
1277 ObjectArray<Object>* array = a->AsObjectArray<Object>(); local
[all...]
H A Dinterpreter_switch_impl.cc473 Object* array = shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data)); local
474 if (UNLIKELY(array == nullptr)) {
478 shadow_frame.SetVReg(inst->VRegA_12x(inst_data), array->AsArray()->GetLength());
934 BooleanArray* array = a->AsBooleanArray(); local
935 if (array->CheckIsValidIndex(index)) {
936 shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
952 ByteArray* array = a->AsByteArray(); local
953 if (array->CheckIsValidIndex(index)) {
954 shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
970 CharArray* array local
988 ShortArray* array = a->AsShortArray(); local
1007 auto* array = down_cast<IntArray*>(a); local
1026 auto* array = down_cast<LongArray*>(a); local
1044 ObjectArray<Object>* array = a->AsObjectArray<Object>(); local
1063 BooleanArray* array = a->AsBooleanArray(); local
1082 ByteArray* array = a->AsByteArray(); local
1101 CharArray* array = a->AsCharArray(); local
1120 ShortArray* array = a->AsShortArray(); local
1140 auto* array = down_cast<IntArray*>(a); local
1160 LongArray* array = down_cast<LongArray*>(a); local
1179 ObjectArray<Object>* array = a->AsObjectArray<Object>(); local
[all...]
/art/runtime/interpreter/mterp/
H A Dmterp.cc82 * we can treat them as a native int array.
87 * we can treat them as a native int array.
92 * Binary-search through the array of keys, which are guaranteed to
139 * we can treat them as a native int array.
378 ObjectArray<Object>* array = a->AsObjectArray<Object>(); local
379 if (array->CheckIsValidIndex(index) && array->CheckAssignable(val)) {
380 array->SetWithoutChecks<false>(index, val);
624 ObjectArray<Object>* array = arr->AsObjectArray<Object>(); local
625 if (LIKELY(array
[all...]
/art/runtime/mirror/
H A Dobject.cc23 #include "array-inl.h"
95 ObjectArray<Object>* array = dest->AsObjectArray<Object>(); local
96 heap->WriteBarrierArray(dest, 0, array->GetLength());
128 // Object::SizeOf gets the right size even if we're an array. Using c->AllocObject() here would
226 // Bounds and assign-ability done in the array setter.
H A Dobject_array-inl.h24 #include "array-inl.h"
39 Array* array = Array::Alloc<true>(self, object_array_class, length, local
42 if (UNLIKELY(array == nullptr)) {
45 DCHECK_EQ(array->GetClass()->GetComponentSizeShift(),
47 return array->AsObjectArray<T>();
207 // we know is assignable to the destination array's component type.
229 // Can't put this element into the array, break to perform write-barrier and throw
242 "source[%d] of type %s cannot be stored in destination array of type %s",
245 LOG(FATAL) << StringPrintf("source[%d] of type %s cannot be stored in destination array of type %s",
H A Dstring-inl.h20 #include "array.h"
192 Handle<ByteArray> array, int32_t offset,
194 SetStringCountAndBytesVisitor visitor(byte_length, array, offset, high_byte << 8);
201 Handle<CharArray> array, int32_t offset,
203 // It is a caller error to have a count less than the actual array's size.
204 DCHECK_GE(array->GetLength(), count);
205 SetStringCountAndValueVisitorFromCharArray visitor(count, array, offset);
191 AllocFromByteArray(Thread* self, int32_t byte_length, Handle<ByteArray> array, int32_t offset, int32_t high_byte, gc::AllocatorType allocator_type) argument
200 AllocFromCharArray(Thread* self, int32_t count, Handle<CharArray> array, int32_t offset, gc::AllocatorType allocator_type) argument
H A Darray-inl.h20 #include "array.h"
40 // This is safe from overflow because the array was already allocated, so we know it's sane.
87 // The array length limit (exclusive).
96 // Used for setting the array length in the allocation code path to ensure it is guarded by a
106 Array* array = down_cast<Array*>(obj); local
107 // DCHECK(array->IsArrayInstance());
108 array->SetLength(length_);
117 // Similar to SetLengthVisitor, used for setting the array length to fill the usable size of an
118 // array.
130 Array* array local
[all...]
H A Dobject_test.cc23 #include "array-inl.h"
313 Object* array = CheckAndAllocArrayFromCodeInstrumented( local
316 EXPECT_TRUE(array->IsArrayInstance());
317 EXPECT_EQ(3, array->AsArray()->GetLength());
318 EXPECT_TRUE(array->GetClass()->IsArrayClass());
319 EXPECT_TRUE(array->GetClass()->GetComponentType()->IsPrimitive());
560 // All array classes implement Cloneable and Serializable.
561 Object* array = ObjectArray<Object>::Alloc(soa.Self(), Object_array_class, 1); local
566 EXPECT_TRUE(array->InstanceOf(java_lang_Cloneable));
567 EXPECT_TRUE(array
[all...]
H A Dstring.cc20 #include "array.h"
105 uint16_t* array = string->GetValue(); local
106 memcpy(array, utf16_data_in, utf16_length * sizeof(uint16_t));
270 void String::GetChars(int32_t start, int32_t end, Handle<CharArray> array, int32_t index) { argument
271 uint16_t* data = array->GetData() + index;
/art/runtime/verifier/
H A Dreg_type_cache.cc274 // The klass_entries_ array does not have primitives or small constants.
396 // Is the resolved part a primitive array?
401 // Is any part not an array (but exists)?
610 const RegType& RegTypeCache::GetComponentType(const RegType& array, mirror::ClassLoader* loader) { argument
611 if (!array.IsArrayTypes()) {
613 } else if (array.IsUnresolvedTypes()) {
614 DCHECK(!array.IsUnresolvedMergedReference()); // Caller must make sure not to ask for this.
615 const std::string descriptor(array.GetDescriptor().as_string());
618 mirror::Class* klass = array.GetClass()->GetComponentType();
643 // be in the entries array, an
[all...]
/art/test/401-optimizing-compiler/src/
H A DMain.java97 // Test that we do NPE checks on array length.
234 public static int $opt$ArrayLengthOfNull(int[] array) { argument
235 return array.length;
/art/test/449-checker-bce/src/
H A DMain.java70 static void narrow(int[] array, int offset) { argument
74 if (offset < array.length) {
75 // offset is in range [0, array.length-1].
77 array[offset] = 1;
80 // biased_offset1 is in range [1, array.length].
81 if (biased_offset1 < array.length) {
82 // biased_offset1 is in range [1, array.length-1].
84 array[biased_offset1] = 1;
88 // biased_offset2 is in range [0x70000000, array.length-1+0x70000000].
90 if (biased_offset2 < array
124 constantIndexing1(int[] array) argument
152 $opt$noinline$constantIndexing2(int[] array) argument
187 constantIndexing2b(int[] array) argument
216 constantIndexing2c(int[] array) argument
284 constantIndexing4(int[] array) argument
302 constantIndexing5(int[] array) argument
323 constantIndexing6(int[] array) argument
350 constantIndexing7(int[] array, int base) argument
380 constantIndexing8(int[] array, int base) argument
411 constantIndexing9(int[] array, int base) argument
444 constantIndexing10(int[] array, int base) argument
578 constantIndexingForward6(int[] array) argument
615 loopPattern1(int[] array) argument
678 loopPattern2(int[] array) argument
714 loopPattern3(int[] array) argument
802 pyramid1(int[] array) argument
823 pyramid2(int[] array) argument
844 pyramid3(int[] array) argument
864 isPyramid(int[] array) argument
918 bubbleSort(int[] array) argument
1024 foo1(int[] array, int start, int end, boolean expectInterpreter) argument
1062 foo2(int[] array, int start, int end, boolean expectInterpreter) argument
1100 foo3(int[] array, int end, boolean expectInterpreter) argument
1139 foo4(int[] array, int end, boolean expectInterpreter) argument
1189 foo5(int[] array, int end, boolean expectInterpreter) argument
1255 foo6(int[] array, int start, int end, boolean expectInterpreter) argument
1291 foo7(int[] array, int start, int end, boolean lowEnd) argument
1374 foo9(int[] array, boolean expectInterpreter) argument
1397 partialLooping(int[] array, int start, int end) argument
[all...]
/art/compiler/
H A Dcompiled_method.h73 static ArrayRef<const T> GetArray(const LengthPrefixedArray<T>* array) { argument
74 if (array == nullptr) {
77 DCHECK_NE(array->size(), 0u);
78 return ArrayRef<const T>(&array->At(0), array->size());
339 // This allows a hashing function to treat an array of linker patches as raw memory.
/art/runtime/native/
H A Ddalvik_system_DexFile.cc52 jarray array = reinterpret_cast<jarray>(arrayObject); local
54 jsize array_size = env->GetArrayLength(array);
59 // TODO: Optimize. On 32bit we can use an int array.
61 jlong* long_data = env->GetLongArrayElements(reinterpret_cast<jlongArray>(array),
73 env->ReleaseLongArrayElements(reinterpret_cast<jlongArray>(array), long_data, JNI_ABORT);
185 jlongArray array = ConvertDexFilesToJavaArray(env, oat_file, dex_files); local
186 if (array == nullptr) {
194 return array;
232 // Clear the element in the array so that we can call close again.
330 // Now create output array an
[all...]
H A Ddalvik_system_VMRuntime.cc124 mirror::Array* array = soa.Decode<mirror::Array*>(javaArray); local
125 if (!array->IsArrayInstance()) {
126 ThrowIllegalArgumentException("not an array");
129 if (Runtime::Current()->GetHeap()->IsMovableObject(array)) {
130 ThrowRuntimeException("Trying to get address of movable array object");
133 return reinterpret_cast<uintptr_t>(array->GetRawData(array->GetClass()->GetComponentSize(), 0));
/art/test/004-JniTest/src/
H A DMain.java261 private static native void enterJniCriticalSection(int arraySize, byte[] array0, byte[] array); argument
/art/test/107-int-math2/src/
H A DMain.java832 static void throwArrayStoreException(Object[] array, Object element) { argument
833 array[0] = element;
838 Object[] array = new Number[2];
840 throwArrayStoreException(array, null);
846 throwArrayStoreException(array, Integer.valueOf(1));
852 throwArrayStoreException(array, "hello MTV-44");
/art/compiler/optimizing/
H A Dload_store_elimination.cc120 // TODO: more fine-grained array types.
147 // It's kDeclaringClassDefIndexForArrays for an array element.
165 ReferenceInfo* const ref_info_; // reference for instance/static field or array access.
167 HInstruction* const index_; // index of an array element.
318 // `index1` and `index2` are indices in the array of collected heap locations.
341 // field and the other is an array element.
410 void VisitArrayAccess(HInstruction* array, HInstruction* index) { argument
411 GetOrCreateHeapLocation(array, HeapLocation::kInvalidFieldOffset,
529 // Populate the heap_values array for this block.
530 // TODO: try to reuse the heap_values array fro
892 HInstruction* array = instruction->InputAt(0); variable
902 HInstruction* array = instruction->InputAt(0); variable
[all...]
H A Dregister_allocator.cc446 // To simplify unit testing, we eagerly create the array of intervals, and
1172 void RegisterAllocator::AddSorted(ArenaVector<LiveInterval*>* array, LiveInterval* interval) { argument
1175 for (size_t i = array->size(); i > 0; --i) {
1176 LiveInterval* current = (*array)[i - 1u];
1184 DCHECK(i == 1 || (*array)[i - 2u]->StartsAfter(current));
1191 auto insert_pos = array->begin() + insert_at;
1193 array->insert(insert_pos, { interval->GetHighInterval(), interval });
1195 array->insert(insert_pos, { interval, interval->GetLowInterval() });
1197 array->insert(insert_pos, interval);
H A Dbounds_check_elimination.cc32 * e.g. array.length - 1.
108 // a constant or array length related value.
120 // Try to detect (array.length + c) format.
157 * Hunt "under the hood" of array lengths (leading to array references),
158 * null checks (also leading to array references), and new arrays
245 // Favor array length as upper bound.
266 // (array.length + non-positive-constant) won't overflow an int.
280 // Regardless of the value new_constant, (array.length+new_constant) will
281 // never underflow since array
1441 HInstruction* array = check->InputAt(0); local
[all...]
/art/runtime/arch/
H A Dstub_test.cc882 // Build a string array of size 1
883 Handle<mirror::ObjectArray<mirror::Object>> array(
896 // 1.1) Assign str_obj to array[0..3]
900 Invoke3(reinterpret_cast<size_t>(array.Get()), 0U, reinterpret_cast<size_t>(str_obj.Get()),
904 EXPECT_EQ(str_obj.Get(), array->Get(0));
906 Invoke3(reinterpret_cast<size_t>(array.Get()), 1U, reinterpret_cast<size_t>(str_obj.Get()),
910 EXPECT_EQ(str_obj.Get(), array->Get(1));
912 Invoke3(reinterpret_cast<size_t>(array.Get()), 2U, reinterpret_cast<size_t>(str_obj.Get()),
916 EXPECT_EQ(str_obj.Get(), array->Get(2));
918 Invoke3(reinterpret_cast<size_t>(array
1179 mirror::Array* array = reinterpret_cast<mirror::Array*>(result); local
[all...]

Completed in 645 milliseconds

123