Home
last modified time | relevance | path

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

12345678910>>...13

/art/test/449-checker-bce/src/
DMain.java72 static void narrow(int[] array, int offset) { in narrow() argument
76 if (offset < array.length) { in narrow()
79 array[offset] = 1; in narrow()
83 if (biased_offset1 < array.length) { in narrow()
86 array[biased_offset1] = 1; in narrow()
92 if (biased_offset2 < array.length) { in narrow()
95 array[biased_offset2] = 1; in narrow()
101 array[offset_sub1] = 1; // Bounds check can be eliminated. in narrow()
107 array[offset_sub2] = 1; // Bounds check can't be eliminated. in narrow()
126 static void constantIndexing1(int[] array) { in constantIndexing1() argument
[all …]
/art/test/527-checker-array-access-split/src/
DMain.java52 public static int constantIndexGet(int array[]) { in constantIndexGet() argument
53 return array[1]; in constantIndexGet()
87 public static void constantIndexSet(int array[]) { in constantIndexSet() argument
88 array[1] = 2; in constantIndexSet()
120 public static int get(int array[], int index) { in get() argument
121 return array[index]; in get()
165 public static void set(int array[], int index, int value) { in set() argument
166 array[index] = value; in set()
233 public static void getSet(int array[], int index) { in getSet() argument
234 array[index] = array[index] + 1; in getSet()
[all …]
/art/test/412-new-array/src/
DMain.java144 int[] array = new int[-1]; in $opt$TestNegativeArraySize() local
224 int[] array = new int[0]; in testSmaliFillArrayData() local
225 Object[] args = { array }; in testSmaliFillArrayData()
227 assertEquals(0, array.length); in testSmaliFillArrayData()
229 array = new int[2]; in testSmaliFillArrayData()
230 args[0] = array; in testSmaliFillArrayData()
233 assertEquals(0, array[0]); in testSmaliFillArrayData()
234 assertEquals(0, array[1]); in testSmaliFillArrayData()
236 array = new int[] { 42, -42 }; in testSmaliFillArrayData()
237 args[0] = array; in testSmaliFillArrayData()
[all …]
/art/test/642-fp-callees/
Dfp_callees.cc26 volatile double array[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 }; variable
32 double a = array[0]; in Java_Main_holdFpTemporaries()
33 double b = array[1]; in Java_Main_holdFpTemporaries()
34 double c = array[2]; in Java_Main_holdFpTemporaries()
35 double d = array[3]; in Java_Main_holdFpTemporaries()
36 double e = array[4]; in Java_Main_holdFpTemporaries()
37 double f = array[5]; in Java_Main_holdFpTemporaries()
38 double g = array[6]; in Java_Main_holdFpTemporaries()
39 double h = array[7]; in Java_Main_holdFpTemporaries()
40 double i = array[8]; in Java_Main_holdFpTemporaries()
[all …]
/art/test/096-array-copy-concurrent-gc/src/
DMain.java45 Object [] array = new Object[8000]; field in Main
63 for (int i = 0; i < array.length; i+=2) { in stressArray()
64 array[i] = new String("Creating some garbage" + i); in stressArray()
71 for (int j = 0; j < array.length; j++) { in stressArray()
72 Object obj = array[array.length - 1]; in stressArray()
73 System.arraycopy(array, 0, array, 1, array.length - 1); in stressArray()
74 array[0] = obj; in stressArray()
78 for (int j = 0; j < array.length; j++) { in stressArray()
79 Object obj = array[0]; in stressArray()
80 System.arraycopy(array, 1, array, 0, array.length - 1); in stressArray()
[all …]
/art/test/412-new-array/smali/
Dfill_array_data.smali8 fill-array-data v0, :ArrayData
12 .array-data 4
13 .end array-data
20 fill-array-data v0, :ArrayData
24 .array-data 4
26 .end array-data
35 .array-data 4
37 .end array-data
40 fill-array-data v0, :ArrayData
48 fill-array-data v0, :ArrayData
[all …]
/art/test/712-varhandle-invocations/src/
DVarHandleUnitTestHelpers.java57 byte[] array = new byte[size]; in createFilledByteArray()
59 array[i] = (byte) (i * 47 + 11); in createFilledByteArray()
61 return array; in createFilledByteArray()
64 public static boolean getBytesAs_boolean(byte[] array, int index, ByteOrder order) { in getBytesAs_boolean() argument
65 return getBytesAs_boolean(ByteBuffer.wrap(array), index, order); in getBytesAs_boolean()
68 public static byte getBytesAs_byte(byte[] array, int index, ByteOrder order) { in getBytesAs_byte() argument
69 return getBytesAs_byte(ByteBuffer.wrap(array), index, order); in getBytesAs_byte()
72 public static char getBytesAs_char(byte[] array, int index, ByteOrder order) { in getBytesAs_char() argument
73 return getBytesAs_char(ByteBuffer.wrap(array), index, order); in getBytesAs_char()
76 public static short getBytesAs_short(byte[] array, int index, ByteOrder order) { in getBytesAs_short() argument
[all …]
DVarHandleArrayTests.java147 byte[] array = new byte[32]; in testByteArrayViewVarHandle()
156 assertThrowsIOOBE(() -> vhShort.get(array, -1)); in testByteArrayViewVarHandle()
157 assertThrowsIOOBE(() -> vhShort.get(array, Integer.MIN_VALUE)); in testByteArrayViewVarHandle()
158 assertThrowsIOOBE(() -> vhShort.get(array, array.length)); in testByteArrayViewVarHandle()
159 assertThrowsIOOBE(() -> vhShort.get(array, array.length - 1)); in testByteArrayViewVarHandle()
160 assertThrowsIOOBE(() -> vhShort.get(array, Integer.MAX_VALUE)); in testByteArrayViewVarHandle()
162 for (int i = 0; i < array.length - 1; ++i) { in testByteArrayViewVarHandle()
165 vhShort.set(array, i, value); in testByteArrayViewVarHandle()
166 assertEquals(value, (short) vhShort.get(array, i)); in testByteArrayViewVarHandle()
167 assertEquals(value, toHost(order, array[i], array[i + 1])); in testByteArrayViewVarHandle()
[all …]
/art/test/2241-checker-inline-try-catch/src/
DMain.java182 private static int $inline$OOBTryCatch(int[] array) { in $inline$OOBTryCatch() argument
184 return array[0]; in $inline$OOBTryCatch()
190 private static int $inline$OtherOOBTryCatch(int[] array) { in $inline$OtherOOBTryCatch() argument
192 return array[0]; in $inline$OtherOOBTryCatch()
198 private static int $inline$OOBTryCatchFinally(int[] array) { in $inline$OOBTryCatchFinally() argument
202 return array[0]; in $inline$OOBTryCatchFinally()
213 private static int $inline$OOBTryCatchLevel4(int[] array) { in $inline$OOBTryCatchLevel4() argument
214 return $inline$OOBTryCatchLevel3(array); in $inline$OOBTryCatchLevel4()
217 private static int $inline$OOBTryCatchLevel3(int[] array) { in $inline$OOBTryCatchLevel3() argument
218 return $inline$OOBTryCatchLevel2(array); in $inline$OOBTryCatchLevel3()
[all …]
/art/test/530-checker-lse-try-catch/src/
DMain.java234 int[] array = {1}; in $noinline$testKeepStoreInsideTry() local
235 main.sumForKeepStoreInsideTryCatch += array[0]; in $noinline$testKeepStoreInsideTry()
236 main.sumForKeepStoreInsideTryCatch += array[1]; in $noinline$testKeepStoreInsideTry()
254 private static int $noinline$testDontKeepStoreInsideCatch(int[] array) { in $noinline$testDontKeepStoreInsideCatch() argument
258 value = array[0]; in $noinline$testDontKeepStoreInsideCatch()
277 private static int $noinline$testKeepStoreInsideCatchWithOuterTry(int[] array) { in $noinline$testKeepStoreInsideCatchWithOuterTry() argument
282 value = array[0]; in $noinline$testKeepStoreInsideCatchWithOuterTry()
307 private static int $noinline$testDontKeepStoreInsideFinally(int[] array) { in $noinline$testDontKeepStoreInsideFinally() argument
311 value = array[0]; in $noinline$testDontKeepStoreInsideFinally()
335 private static int $noinline$testDontKeepStoreInsideOuterCatch(int[] array) { in $noinline$testDontKeepStoreInsideOuterCatch() argument
[all …]
/art/test/499-bce-phi-array-length/src/
DMain.java18 public static int foo(int start, int[] array) { in foo() argument
23 result += array[i]; in foo()
29 result += array[j]; in foo()
35 public static int bar(int start, int[] array) { in bar() argument
38 result += array[i]; in bar()
40 result += array[j]; in bar()
44 result += array[0]; in bar()
45 result += array[1]; in bar()
46 result += array[2]; in bar()
/art/test/554-checker-rtp-checkcast/src/
DMain.java28 int[] array = new int[20]; in boundTypeForMergingPhi() local
29 if (array.hashCode() > 5) { in boundTypeForMergingPhi()
30 array = (int[]) returnIntArray(); in boundTypeForMergingPhi()
32 array[0] = 14; in boundTypeForMergingPhi()
41 int[] array = new int[20]; in boundTypeForLoopPhi() local
45 array[i] = i; in boundTypeForLoopPhi()
47 array = (int[]) returnIntArray(); in boundTypeForLoopPhi()
50 array[0] = 14; in boundTypeForLoopPhi()
/art/test/534-checker-bce-deoptimization/src/
DMain.java72 float[] array = new float[2]; in testPreserveFloat() local
74 $noinline$FloatFill(1.125f, 2.5f, array, 3); in testPreserveFloat()
77 System.out.println("array[0]=" + array[0] + "f"); in testPreserveFloat()
78 System.out.println("array[1]=" + array[1] + "f"); in testPreserveFloat()
91 public static void $noinline$FloatFill(float f1, float f2, float[] array, int n) { in $noinline$FloatFill() argument
93 array[i] = ((i & 1) == 1) ? f1 : f2; in $noinline$FloatFill()
100 double[] array = new double[2]; in testPreserveDouble() local
102 $noinline$DoubleFill(2.125, 3.5, array, 3); in testPreserveDouble()
105 System.out.println("array[0]=" + array[0]); in testPreserveDouble()
106 System.out.println("array[1]=" + array[1]); in testPreserveDouble()
[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/test/680-checker-deopt-dex-pc-0/src/
DMain.java21 public static int $noinline$getInt(byte[] array, int offset) { in $noinline$getInt() argument
24 return ((array[offset ] & 0xFF) << 0) + in $noinline$getInt()
25 ((array[offset + 1] & 0xFF) << 8) + in $noinline$getInt()
26 ((array[offset + 2] & 0xFF) << 16) + in $noinline$getInt()
27 ((array[offset + 3] & 0xFF) << 24); in $noinline$getInt()
33 byte[] array = { 0, 1, 2, 3 }; in main()
38 if ($noinline$getInt(array, 0) != 0x03020100) { in main()
48 $noinline$getInt(array, 1); in main()
/art/test/535-deopt-and-inlining/src/
DMain.java30 public static void doCall(int[] array) { in doCall() argument
32 deopt(array); in doCall()
38 public static void deopt(int[] array) { in deopt() argument
43 $inline$deopt(array); in deopt()
49 public static void $inline$deopt(int[] array) { in $inline$deopt() argument
50 array[0] = 1; in $inline$deopt()
51 array[1] = 1; in $inline$deopt()
/art/test/559-checker-rtp-ifnotnull/src/
DMain.java39 int[] array = null; in boundTypeForIfNotNull() local
41 if (array == null) { in boundTypeForIfNotNull()
42 array = new int[5]; in boundTypeForIfNotNull()
45 array = new int[10]; in boundTypeForIfNotNull()
47 array[i] = i; in boundTypeForIfNotNull()
50 array.hashCode(); in boundTypeForIfNotNull()
/art/runtime/interpreter/
Dinterpreter_switch_impl1.cc54 static void RecordArrayElementsInTransaction(ObjPtr<mirror::Object> array, int32_t count)
76 ObjPtr<mirror::PrimitiveArray<T>> array, in RecordArrayElementsInTransactionImpl() argument
80 transaction->RecordWriteArray(array.Ptr(), i, array->GetWithoutChecks(i)); in RecordArrayElementsInTransactionImpl()
84 void ActiveTransactionChecker::RecordArrayElementsInTransaction(ObjPtr<mirror::Object> array, in RecordArrayElementsInTransaction() argument
87 if (array == nullptr) { in RecordArrayElementsInTransaction()
90 DCHECK(array->IsArrayInstance()); in RecordArrayElementsInTransaction()
91 DCHECK_LE(count, array->AsArray()->GetLength()); in RecordArrayElementsInTransaction()
93 if (!transaction->ArrayNeedsTransactionRecords(array->AsArray())) { in RecordArrayElementsInTransaction()
99 array->GetClass<kDefaultVerifyFlags, kWithoutReadBarrier>() in RecordArrayElementsInTransaction()
103 RecordArrayElementsInTransactionImpl(transaction, array->AsBooleanArray(), count); in RecordArrayElementsInTransaction()
[all …]
/art/test/472-type-propagation/src/
DMain.java23 public static void ssaBuilderDouble(double[] array) { in ssaBuilderDouble() argument
25 if (array.length > 3) { in ssaBuilderDouble()
26 x = array[0]; in ssaBuilderDouble()
28 x = array[1]; in ssaBuilderDouble()
30 array[2] = x; in ssaBuilderDouble()
/art/test/706-checker-scheduler/src/
DMain.java60 int [] array = new int[10]; in arrayAccess() local
62 res += array[i]; in arrayAccess()
63 res += array[i + 1]; in arrayAccess()
144 int [] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; in arrayAccessVariable() local
146 array[i + 1]++; in arrayAccessVariable()
147 array[i + 2]++; in arrayAccessVariable()
148 array[i - 1]++; in arrayAccessVariable()
212 int [] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; in arrayAccessSub() local
215 array[i - 1]++; in arrayAccessSub()
216 array[9 - i]++; in arrayAccessSub()
[all …]
/art/test/534-checker-bce-deoptimization/
Dexpected-stdout.txt1 array[0]=2.5f
2 array[1]=2.625f
3 array[0]=3.5
4 array[1]=3.625
/art/test/655-jit-clinit/src/
DMain.java35 for (int i = 0; i < array.length; ++i) { in $noinline$hotMethod()
36 array[i] = array; in $noinline$hotMethod()
41 array = new Object[10000];
56 static Object[] array; field in Foo
/art/compiler/optimizing/
Dx86_memory_gen.cc43 HInstruction* array = array_len->InputAt(0); in VisitBoundsCheck() local
44 DCHECK_EQ(array->GetType(), DataType::Type::kReference); in VisitBoundsCheck()
47 if (array->IsConstant() || (array->IsNullCheck() && array->InputAt(0)->IsConstant())) { in VisitBoundsCheck()
52 if (array->IsNullCheck() && do_implicit_null_checks_) { in VisitBoundsCheck()
/art/test/609-checker-x86-bounds-check/src/
DMain.java20 int[] array = new int[51]; in main() local
21 testArrayLengthBoundsCheckX86(array, 10); in main()
85 static void testArrayLengthBoundsCheckX86(int[] array, int index) { in testArrayLengthBoundsCheckX86() argument
86 array[index] = 9; in testArrayLengthBoundsCheckX86()
/art/test/726-array-store/
DAndroid.bp3 // Build rules for ART run-test `726-array-store`.
16 name: "art-run-test-726-array-store",
21 ":art-run-test-726-array-store-expected-stdout",
22 ":art-run-test-726-array-store-expected-stderr",
28 name: "art-run-test-726-array-store-expected-stdout",
29 out: ["art-run-test-726-array-store-expected-stdout.txt"],
36 name: "art-run-test-726-array-store-expected-stderr",
37 out: ["art-run-test-726-array-store-expected-stderr.txt"],

12345678910>>...13