Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 922) sorted by relevance

12345678910>>...37

/libcore/luni/src/main/java/java/math/
DLogical.java47 int i; in not() local
52 for (i = 0; val.digits[i] == -1; i++) { in not()
56 for (i = 0; (i < val.numberLength) && (val.digits[i] == -1); i++) { in not()
59 if (i == val.numberLength) { in not()
60 resDigits[i] = 1; in not()
61 return new BigInteger(-val.sign, i + 1, resDigits); in not()
67 for (i = 0; val.digits[i] == 0; i++) { in not()
68 resDigits[i] = -1; in not()
73 resDigits[i] = val.digits[i] + val.sign; in not()
75 for (i++; i < val.numberLength; i++) { in not()
[all …]
DBitLevel.java50 int i = val.getFirstNonzeroDigit(); in bitLength() local
52 if (i == val.numberLength - 1) { in bitLength()
70 int i = val.getFirstNonzeroDigit(); in bitCount() local
72 for ( ; i < val.numberLength; i++) { in bitCount()
73 bCount += Integer.bitCount(val.digits[i]); in bitCount()
77 bCount += Integer.bitCount(-val.digits[i]); in bitCount()
78 for (i++; i < val.numberLength; i++) { in bitCount()
79 bCount += Integer.bitCount(~val.digits[i]); in bitCount()
106 int i; in nonZeroDroppedBits() local
108 for (i = 0; (i < intCount) && (digits[i] == 0); i++) { in nonZeroDroppedBits()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DInputSourceTest.java31 InputSource i = new InputSource(); in testInputSource() local
33 assertNull(i.getByteStream()); in testInputSource()
34 assertNull(i.getCharacterStream()); in testInputSource()
35 assertNull(i.getEncoding()); in testInputSource()
36 assertNull(i.getPublicId()); in testInputSource()
37 assertNull(i.getSystemId()); in testInputSource()
41 InputSource i = new InputSource("Foo"); in testInputSourceString() local
43 assertNull(i.getByteStream()); in testInputSourceString()
44 assertNull(i.getCharacterStream()); in testInputSourceString()
45 assertNull(i.getEncoding()); in testInputSourceString()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DIntegerBenchmark.java25 for (int i = 0; i < reps; ++i) { in timeLongSignumBranch()
26 t += signum1(-i); in timeLongSignumBranch()
28 t += signum1(i); in timeLongSignumBranch()
35 for (int i = 0; i < reps; ++i) { in timeLongSignumBranchFree()
36 t += signum2(-i); in timeLongSignumBranchFree()
38 t += signum2(i); in timeLongSignumBranchFree()
53 for (int i = 0; i < reps; ++i) { in timeLongBitCount_BitSet()
54 t += pop((long) i); in timeLongBitCount_BitSet()
79 for (int i = 0; i < reps; ++i) { in timeLongBitCount_2Int()
80 t += pop2((long) i); in timeLongBitCount_2Int()
[all …]
DCharacterBenchmark.java51 for (int i = 0; i < 65536; ++i) { in CharacterSet()
52 chars[i] = (char) (i % size); in CharacterSet()
61 for (int i = 0; i < reps; ++i) { in timeIsSpace()
67 for (int i = 0; i < reps; ++i) { in timeIsSpace()
78 for (int i = 0; i < reps; ++i) { in timeDigit()
84 for (int i = 0; i < reps; ++i) { in timeDigit()
94 for (int i = 0; i < reps; ++i) { in timeGetNumericValue()
100 for (int i = 0; i < reps; ++i) { in timeGetNumericValue()
110 for (int i = 0; i < reps; ++i) { in timeIsDigit()
116 for (int i = 0; i < reps; ++i) { in timeIsDigit()
[all …]
DExpensiveObjectsBenchmark.java31 for (int i = 0; i < reps; ++i) { in timeNewDateFormatTimeInstance()
39 for (int i = 0; i < reps; ++i) { in timeClonedDateFormatTimeInstance()
46 for (int i = 0; i < reps; ++i) { in timeReusedDateFormatTimeInstance()
54 for (int i = 0; i < reps; ++i) { in timeNewCollator()
61 for (int i = 0; i < reps; ++i) { in timeClonedCollator()
67 for (int i = 0; i < reps; ++i) { in timeNewDateFormatSymbols()
74 for (int i = 0; i < reps; ++i) { in timeClonedDateFormatSymbols()
80 for (int i = 0; i < reps; ++i) { in timeNewDecimalFormatSymbols()
87 for (int i = 0; i < reps; ++i) { in timeClonedDecimalFormatSymbols()
93 for (int i = 0; i < reps; ++i) { in timeNewNumberFormat()
[all …]
DIntConstantMultiplicationBenchmark.java26 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant6()
33 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant7()
40 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant8()
47 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant8_Shift()
54 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant10()
61 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant10_Shift()
68 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2047()
75 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2048()
82 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByConstant2049()
90 for (int i = 0; i < reps; ++i) { in timeMultiplyIntByVariable10()
[all …]
DAnnotatedElementBenchmark.java42 for (int i = 0; i < reps; i++) { in timeGetTypeAnnotations()
48 for (int i = 0; i < reps; i++) { in timeGetFieldAnnotations()
54 for (int i = 0; i < reps; i++) { in timeGetMethodAnnotations()
60 for (int i = 0; i < reps; i++) { in timeGetParameterAnnotations()
66 for (int i = 0; i < reps; i++) { in timeGetTypeAnnotation()
72 for (int i = 0; i < reps; i++) { in timeGetFieldAnnotation()
78 for (int i = 0; i < reps; i++) { in timeGetMethodAnnotation()
84 for (int i = 0; i < reps; i++) { in timeIsTypeAnnotationPresent()
90 for (int i = 0; i < reps; i++) { in timeIsFieldAnnotationPresent()
96 for (int i = 0; i < reps; i++) { in timeIsMethodAnnotationPresent()
[all …]
DBitSetBenchmark.java34 for (int i = 0; i < reps; ++i) { in timeIsEmptyTrue()
41 for (int i = 0; i < reps; ++i) { in timeIsEmptyFalse()
47 for (int i = 0; i < reps; ++i) { in timeGet()
48 bs.get(i % size); in timeGet()
53 for (int i = 0; i < reps; ++i) { in timeClear()
54 bs.clear(i % size); in timeClear()
59 for (int i = 0; i < reps; ++i) { in timeSet()
60 bs.set(i % size); in timeSet()
65 for (int i = 0; i < reps; ++i) { in timeSetOn()
66 bs.set(i % size, true); in timeSetOn()
[all …]
DFormatterBenchmark.java29 for (int i = 0; i < reps; i++) { in timeFormatter_NoFormatting()
36 for (int i = 0; i < reps; i++) { in timeStringBuilder_NoFormatting()
44 for (int i = 0; i < reps; i++) { in timeFormatter_OneInt()
53 for (int i = 0; i < reps; i++) { in timeFormatter_OneIntArabic()
60 for (int i = 0; i < reps; i++) { in timeStringBuilder_OneInt()
70 for (int i = 0; i < reps; i++) { in timeFormatter_OneHexInt()
77 for (int i = 0; i < reps; i++) { in timeStringBuilder_OneHexInt()
87 for (int i = 0; i < reps; i++) { in timeFormatter_OneFloat()
95 for (int i = 0; i < reps; i++) { in timeFormatter_OneFloat_dot2f()
103 for (int i = 0; i < reps; i++) { in timeFormatter_TwoFloats()
[all …]
DIntConstantDivisionBenchmark.java26 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant2()
33 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant8()
40 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant10()
47 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant100()
54 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant100_HandOptimized()
61 for (int i = 0; i < reps; ++i) { in timeDivideIntByConstant2048()
69 for (int i = 0; i < reps; ++i) { in timeDivideIntByVariable2()
77 for (int i = 0; i < reps; ++i) { in timeDivideIntByVariable10()
/libcore/luni/src/main/java/java/lang/
DInteger.java160 int i = 0; in decode() local
161 char firstDigit = string.charAt(i); in decode()
167 firstDigit = string.charAt(++i); in decode()
172 if (++i == length) { in decode()
175 if ((firstDigit = string.charAt(i)) == 'x' || firstDigit == 'X') { in decode()
176 if (++i == length) { in decode()
184 if (++i == length) { in decode()
190 int result = parse(string, i, base, negative); in decode()
443 public static String toBinaryString(int i) { in toBinaryString() argument
444 return IntegralToString.intToBinaryString(i); in toBinaryString()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicLongArrayTest.java22 for (int i = 0; i < SIZE; i++) in testConstructor()
23 assertEquals(0, aa.get(i)); in testConstructor()
44 for (int i = 0; i < a.length; i++) in testConstructor2()
45 assertEquals(a[i], aa.get(i)); in testConstructor2()
90 for (int i = 0; i < SIZE; i++) { in testGetSet()
91 aa.set(i, 1); in testGetSet()
92 assertEquals(1, aa.get(i)); in testGetSet()
93 aa.set(i, 2); in testGetSet()
94 assertEquals(2, aa.get(i)); in testGetSet()
95 aa.set(i, -3); in testGetSet()
[all …]
DAtomicIntegerArrayTest.java22 for (int i = 0; i < SIZE; i++) in testConstructor()
23 assertEquals(0, aa.get(i)); in testConstructor()
44 for (int i = 0; i < a.length; i++) in testConstructor2()
45 assertEquals(a[i], aa.get(i)); in testConstructor2()
90 for (int i = 0; i < SIZE; i++) { in testGetSet()
91 aa.set(i, 1); in testGetSet()
92 assertEquals(1, aa.get(i)); in testGetSet()
93 aa.set(i, 2); in testGetSet()
94 assertEquals(2, aa.get(i)); in testGetSet()
95 aa.set(i, -3); in testGetSet()
[all …]
DPriorityQueueTest.java35 for (int i = n-1; i >= 0; i-=2) in populatedQueue()
36 assertTrue(q.offer(new Integer(i))); in populatedQueue()
37 for (int i = (n & 1); i < n; i+=2) in populatedQueue()
38 assertTrue(q.offer(new Integer(i))); in populatedQueue()
88 for (int i = 0; i < SIZE-1; ++i) in testConstructor5()
89 ints[i] = new Integer(i); in testConstructor5()
100 for (int i = 0; i < SIZE; ++i) in testConstructor6()
101 ints[i] = new Integer(i); in testConstructor6()
103 for (int i = 0; i < SIZE; ++i) in testConstructor6()
104 assertEquals(ints[i], q.poll()); in testConstructor6()
[all …]
DLinkedListTest.java27 for (int i = 0; i < n; ++i) in populatedQueue()
28 assertTrue(q.offer(new Integer(i))); in populatedQueue()
56 for (int i = 0; i < SIZE; ++i) in testConstructor6()
57 ints[i] = i; in testConstructor6()
59 for (int i = 0; i < SIZE; ++i) in testConstructor6()
60 assertEquals(ints[i], q.poll()); in testConstructor6()
82 for (int i = 0; i < SIZE; ++i) { in testSize()
83 assertEquals(SIZE-i, q.size()); in testSize()
86 for (int i = 0; i < SIZE; ++i) { in testSize()
87 assertEquals(i, q.size()); in testSize()
[all …]
DAtomicReferenceArrayTest.java22 for (int i = 0; i < SIZE; i++) { in testConstructor()
23 assertNull(aa.get(i)); in testConstructor()
45 for (int i = 0; i < a.length; i++) in testConstructor2()
46 assertEquals(a[i], aa.get(i)); in testConstructor2()
56 for (int i = 0; i < a.length; i++) { in testConstructorSubClassArray()
57 assertSame(a[i], aa.get(i)); in testConstructorSubClassArray()
58 Long x = Long.valueOf(i); in testConstructorSubClassArray()
59 aa.set(i, x); in testConstructorSubClassArray()
60 assertSame(x, aa.get(i)); in testConstructorSubClassArray()
98 for (int i = 0; i < SIZE; i++) { in testGetSet()
[all …]
DConcurrentLinkedQueueTest.java28 for (int i = 0; i < n; ++i) in populatedQueue()
29 assertTrue(q.offer(new Integer(i))); in populatedQueue()
69 for (int i = 0; i < SIZE-1; ++i) in testConstructor5()
70 ints[i] = new Integer(i); in testConstructor5()
81 for (int i = 0; i < SIZE; ++i) in testConstructor6()
82 ints[i] = new Integer(i); in testConstructor6()
84 for (int i = 0; i < SIZE; ++i) in testConstructor6()
85 assertEquals(ints[i], q.poll()); in testConstructor6()
107 for (int i = 0; i < SIZE; ++i) { in testSize()
108 assertEquals(SIZE-i, q.size()); in testSize()
[all …]
/libcore/luni/src/test/java/dalvik/system/
DJniTest.java98 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
99 a[i] = literal; in testPassingObjectReferences()
101 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
102 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
109 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
110 a[i] = literals[(i + j) % literals.length]; in testPassingObjectReferences()
112 for(int i = 0; i < 16; i++) { in testPassingObjectReferences()
113 assertEquals(a[i], returnObjectArgFrom16(i, a[0], a[1], a[2], a[3], a[4], in testPassingObjectReferences()
126 for(int i = 0; i < 16; i++) { in testPassingBooleans()
127 a[i] = literal; in testPassingBooleans()
[all …]
/libcore/benchmarks/src/benchmarks/
DDeepArrayOpsBenchmark.java38 for (int i = 0; i < arrayLength; i += 13) { in setUp()
39 array[i] = new IntWrapper(i); in setUp()
40 array2[i] = new IntWrapper(i); in setUp()
42 array[i + 1] = new16ElementObjectarray(); in setUp()
43 array2[i + 1] = new16ElementObjectarray(); in setUp()
45 array[i + 2] = new boolean[16]; in setUp()
46 array2[i + 2] = new boolean[16]; in setUp()
48 array[i + 3] = new byte[16]; in setUp()
49 array2[i + 3] = new byte[16]; in setUp()
51 array[i + 4] = new char[16]; in setUp()
[all …]
DMethodInvocationBenchmark.java40 for (int i = 0; i < reps; ++i) { in timeInternalGetter()
48 for (int i = 0; i < reps; ++i) { in timeInternalFieldAccess()
75 for (int i = 0; i < reps; ++i) { in timeStringLength()
83 for (int i = 0; i < reps; ++i) { in timeEmptyStatic()
90 for (int i = 0; i < reps; ++i) { in timeEmptyVirtual()
97 for (int i = 0; i < reps; ++i) { in timeEmptyInterface()
103 private int i; field in MethodInvocationBenchmark.Inner
104 private void privateMethod() { ++i; } in privateMethod()
105 protected void protectedMethod() { ++i; } in protectedMethod()
106 public void publicMethod() { ++i; } in publicMethod()
[all …]
DAdditionBenchmark.java29 for (int i = 0; i < reps; ++i) { in timeAddConstantToLocalInt()
37 for (int i = 0; i < reps; ++i) { in timeAddTwoLocalInts()
44 for (int i = 0; i < reps; ++i) { in timeAddConstantToLocalLong()
52 for (int i = 0; i < reps; ++i) { in timeAddTwoLocalLongs()
59 for (int i = 0; i < reps; ++i) { in timeAddConstantToLocalFloat()
67 for (int i = 0; i < reps; ++i) { in timeAddTwoLocalFloats()
74 for (int i = 0; i < reps; ++i) { in timeAddConstantToLocalDouble()
82 for (int i = 0; i < reps; ++i) { in timeAddTwoLocalDoubles()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConstructorsTest.java56 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive1()
57 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive1()
72 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive2()
73 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive2()
88 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive3()
89 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive3()
104 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive()
105 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesPositive()
120 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesNegative1()
121 assertTrue(resBytes[i] == rBytes[i]); in testConstructorBytesNegative1()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DBitSetTest.java92 for (int i = 0; i < 8; i++) { in test_clear()
93 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear()
112 for (int i = 0; i < 7; i++) { in test_clearI()
113 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
165 for (int i = 0; i < 20; i++) { in test_clearII()
166 bitset.set(i); in test_clearII()
178 for (int i = 0; i < 7; i++) { in test_clearII()
179 if (i == 5) { in test_clearII()
180 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
182 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
[all …]
DWeakHashMapTest.java57 for (int i = 0; i < 100; i++) in test_Constructor()
58 whm.put(keyArray[i], valueArray[i]); in test_Constructor()
59 for (int i = 0; i < 100; i++) in test_Constructor()
61 whm.get(keyArray[i]) == valueArray[i]); in test_Constructor()
71 for (int i = 0; i < 100; i++) in test_ConstructorI()
72 whm.put(keyArray[i], valueArray[i]); in test_ConstructorI()
73 for (int i = 0; i < 100; i++) in test_ConstructorI()
75 whm.get(keyArray[i]) == valueArray[i]); in test_ConstructorI()
96 for (int i = 0; i < 100; i++) in test_ConstructorIF()
97 whm.put(keyArray[i], valueArray[i]); in test_ConstructorIF()
[all …]

12345678910>>...37