Home
last modified time | relevance | path

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

12345678910>>...34

/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/luni/src/test/java/tests/api/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 …]
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()
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 …]
DNativeMethodBenchmark.java24 for (int i = 0; i < reps; ++i) { in time_emptyJniStaticSynchronizedMethod0()
31 for (int i = 0; i < reps; ++i) { in time_emptyJniSynchronizedMethod0()
37 for (int i = 0; i < reps; ++i) { in time_emptyJniStaticMethod0()
44 for (int i = 0; i < reps; ++i) { in time_emptyJniMethod0()
52 for (int i = 0; i < reps; ++i) { in time_emptyJniStaticMethod6()
53 NativeTestTarget.emptyJniStaticMethod6(a, b, 1, 2, 3, i); in time_emptyJniStaticMethod6()
61 for (int i = 0; i < reps; ++i) { in time_emptyJniMethod6()
62 n.emptyJniMethod6(a, b, 1, 2, 3, i); in time_emptyJniMethod6()
67 for (int i = 0; i < reps; ++i) { in time_emptyJniStaticMethod6L()
74 for (int i = 0; i < reps; ++i) { in time_emptyJniMethod6L()
DStringSplitBenchmark.java24 for (int i = 0; i < reps; ++i) { in timeStringSplitComma()
30 for (int i = 0; i < reps; ++i) { in timeStringSplitLiteralDot()
36 for (int i = 0; i < reps; ++i) { in timeStringSplitNewline()
43 for (int i = 0; i < reps; ++i) { in timePatternSplitComma()
50 for (int i = 0; i < reps; ++i) { in timePatternSplitLiteralDot()
56 for (int i = 0; i < reps; ++i) { in timeStringSplitHard()
DStringCaseMappingBenchmark.java67 for (int i = 0; i < length; ++i) { in makeString()
68 sb.append(alphabet.charAt(i % alphabet.length())); in makeString()
76 for (int i = 0; i < reps; ++i) { in timeToUpperCase_US()
82 for (int i = 0; i < reps; ++i) { in timeToLowerCase_US()
88 for (int i = 0; i < reps; ++i) { in timeToUpperCase_Ascii()
94 for (int i = 0; i < reps; ++i) { in timeToLowerCase_Ascii()
100 for (int i = 0; i < reps; ++i) { in timeToUpperCase_ICU()
106 for (int i = 0; i < reps; ++i) { in timeToLowerCase_ICU()
112 for (int i = 0, length = s.length(); i < length; i++) { in toUpperCaseAscii()
113 char c = s.charAt(i); in toUpperCaseAscii()
[all …]
/libcore/luni/src/main/java/java/lang/
DInteger.java154 int length = string.length(), i = 0; in decode() local
158 char firstDigit = string.charAt(i); in decode()
164 firstDigit = string.charAt(++i); in decode()
169 if (++i == length) { in decode()
172 if ((firstDigit = string.charAt(i)) == 'x' || firstDigit == 'X') { in decode()
173 if (++i == length) { in decode()
181 if (++i == length) { in decode()
187 int result = parse(string, i, base, negative); in decode()
356 int length = string.length(), i = 0; in parseInt() local
360 boolean negative = string.charAt(i) == '-'; in parseInt()
[all …]
/libcore/benchmarks/src/benchmarks/
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 …]
DBigIntegerOperateBitsTest.java151 for(int i = 0; i < resBytes.length; i++) { in testClearBitZero()
152 assertTrue(resBytes[i] == rBytes[i]); in testClearBitZero()
169 for(int i = 0; i < resBytes.length; i++) { in testClearBitZeroOutside1()
170 assertTrue(resBytes[i] == rBytes[i]); in testClearBitZeroOutside1()
187 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside1()
188 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeInside1()
205 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside2()
206 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeInside2()
262 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeOutside1()
263 assertTrue(resBytes[i] == rBytes[i]); in testClearBitNegativeOutside1()
[all …]
DBigIntegerAddTest.java45 for(int i = 0; i < resBytes.length; i++) { in testCase1()
46 assertTrue(resBytes[i] == rBytes[i]); in testCase1()
65 for(int i = 0; i < resBytes.length; i++) { in testCase2()
66 assertTrue(resBytes[i] == rBytes[i]); in testCase2()
87 for(int i = 0; i < resBytes.length; i++) { in testCase3()
88 assertTrue(resBytes[i] == rBytes[i]); in testCase3()
109 for(int i = 0; i < resBytes.length; i++) { in testCase4()
110 assertTrue(resBytes[i] == rBytes[i]); in testCase4()
131 for(int i = 0; i < resBytes.length; i++) { in testCase5()
132 assertTrue(resBytes[i] == rBytes[i]); in testCase5()
[all …]
/libcore/luni/src/test/java/tests/api/java/util/
DBitSetTest.java87 for (int i = 0; i < 8; i++) { in test_clear()
88 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear()
106 for (int i = 0; i < 7; i++) in test_clearI()
107 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
150 for (int i = 0; i < 20; i++) { in test_clearII()
151 bitset.set(i); in test_clearII()
166 for (int i = initialSize; i < bs.size(); i++) { in test_clearII()
167 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
176 for (int i = 0; i < 7; i++) { in test_clearII()
177 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
[all …]
DWeakHashMapTest.java56 for (int i = 0; i < 100; i++) in test_Constructor()
57 whm.put(keyArray[i], valueArray[i]); in test_Constructor()
58 for (int i = 0; i < 100; i++) in test_Constructor()
60 whm.get(keyArray[i]) == valueArray[i]); in test_Constructor()
70 for (int i = 0; i < 100; i++) in test_ConstructorI()
71 whm.put(keyArray[i], valueArray[i]); in test_ConstructorI()
72 for (int i = 0; i < 100; i++) in test_ConstructorI()
74 whm.get(keyArray[i]) == valueArray[i]); in test_ConstructorI()
95 for (int i = 0; i < 100; i++) in test_ConstructorIF()
96 whm.put(keyArray[i], valueArray[i]); in test_ConstructorIF()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
DAtomicLongArray.java32 private long checkedByteOffset(int i) { in checkedByteOffset() argument
33 if (i < 0 || i >= array.length) in checkedByteOffset()
34 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset()
36 return byteOffset(i); in checkedByteOffset()
39 private static long byteOffset(int i) { in byteOffset() argument
40 return ((long) i << shift) + base; in byteOffset()
80 public final long get(int i) { in get() argument
81 return getRaw(checkedByteOffset(i)); in get()
94 public final void set(int i, long newValue) { in set() argument
95 unsafe.putLongVolatile(array, checkedByteOffset(i), newValue); in set()
[all …]
DAtomicIntegerArray.java33 private long checkedByteOffset(int i) { in checkedByteOffset() argument
34 if (i < 0 || i >= array.length) in checkedByteOffset()
35 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset()
37 return byteOffset(i); in checkedByteOffset()
40 private static long byteOffset(int i) { in byteOffset() argument
41 return ((long) i << shift) + base; in byteOffset()
81 public final int get(int i) { in get() argument
82 return getRaw(checkedByteOffset(i)); in get()
95 public final void set(int i, int newValue) { in set() argument
96 unsafe.putIntVolatile(array, checkedByteOffset(i), newValue); in set()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DMacTest.java78 for (int i = 0; i < validAlgorithmsMac.length; i++) {
79 defaultProvider = SpiEngUtils.isSupport(validAlgorithmsMac[i],
83 defaultAlgorithm = validAlgorithmsMac[i];
122 for (int i = 0; i < invalidValues.length; i++) { in testMac01()
124 Mac.getInstance(invalidValues[i]); in testMac01()
126 .concat(invalidValues[i])); in testMac01()
142 for (int i = 0; i < validValues.length; i++) { in testMac02()
143 mac = Mac.getInstance(validValues[i]); in testMac02()
144 assertEquals("Incorrect algorithm", mac.getAlgorithm(), validValues[i]); in testMac02()
159 for (int i = 0; i < validValues.length; i++) { in testMac03()
[all …]

12345678910>>...34