/libcore/luni/src/main/java/java/math/ |
D | Logical.java | 47 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 …]
|
D | BitLevel.java | 50 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 …]
|
D | Primality.java | 72 for (int i = 0; i < primes.length; i++) { 73 BIprimes[i] = BigInteger.valueOf(primes[i]); 87 int i, j; in nextProbablePrime() local 97 for (i = 0; l >= primes[i]; i++) {} in nextProbablePrime() 98 return BIprimes[i]; in nextProbablePrime() 115 for (i = 0; i < primes.length; i++) { in nextProbablePrime() 116 modules[i] = BigInt.remainderByPositiveInt(startPoint, primes[i]) - gapSize; in nextProbablePrime() 123 for (i = 0; i < primes.length; i++) { in nextProbablePrime() 124 modules[i] = (modules[i] + gapSize) % primes[i]; in nextProbablePrime() 125 j = (modules[i] == 0) ? 0 : (primes[i] - modules[i]); in nextProbablePrime() [all …]
|
/libcore/luni/src/test/java/tests/api/org/xml/sax/ |
D | InputSourceTest.java | 31 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/ |
D | IntegerBenchmark.java | 25 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 …]
|
D | CharacterBenchmark.java | 51 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 …]
|
D | ExpensiveObjectsBenchmark.java | 31 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 …]
|
D | IntConstantMultiplicationBenchmark.java | 26 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 …]
|
D | BitSetBenchmark.java | 34 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 …]
|
D | AnnotatedElementBenchmark.java | 42 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 …]
|
D | IntConstantDivisionBenchmark.java | 26 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()
|
D | FormatterBenchmark.java | 29 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 …]
|
D | NativeMethodBenchmark.java | 24 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()
|
D | StringSplitBenchmark.java | 24 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()
|
D | StringCaseMappingBenchmark.java | 67 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 …]
|
D | PropertyAccessBenchmark.java | 37 for (int i = 0; i < reps; i++) { in timeDirectSetter() 43 for (int i = 0; i < reps; i++) { in timeDirectFieldSet() 49 for (int i = 0; i < reps; i++) { in timeDirectSetterAndBoxing() 56 for (int i = 0; i < reps; i++) { in timeDirectFieldSetAndBoxing() 63 for (int i = 0; i < reps; i++) { in timeReflectionSetterAndTwoBoxes() 69 for (int i = 0; i < reps; i++) { in timeReflectionSetterAndOneBox() 76 for (int i = 0; i < reps; i++) { in timeReflectionFieldSet() 82 for (int i = 0; i < reps; i++) { in timeGeneratedSetter() 88 for (int i = 0; i < reps; i++) { in timeGeneratedFieldSet()
|
D | StringBuilderBenchmark.java | 31 for (int i = 0; i < reps; ++i) { in timeAppendBoolean() 40 for (int i = 0; i < reps; ++i) { in timeAppendChar() 50 for (int i = 0; i < reps; ++i) { in timeAppendCharArray() 60 for (int i = 0; i < reps; ++i) { in timeAppendCharSequence() 70 for (int i = 0; i < reps; ++i) { in timeAppendDouble() 80 for (int i = 0; i < reps; ++i) { in timeAppendFloat() 90 for (int i = 0; i < reps; ++i) { in timeAppendInt() 100 for (int i = 0; i < reps; ++i) { in timeAppendLong() 115 for (int i = 0; i < reps; ++i) { in timeAppendObject() 125 for (int i = 0; i < reps; ++i) { in timeAppendString()
|
/libcore/luni/src/main/java/java/lang/ |
D | Integer.java | 155 int length = string.length(), i = 0; in decode() local 159 char firstDigit = string.charAt(i); in decode() 165 firstDigit = string.charAt(++i); in decode() 170 if (++i == length) { in decode() 173 if ((firstDigit = string.charAt(i)) == 'x' || firstDigit == 'X') { in decode() 174 if (++i == length) { in decode() 182 if (++i == length) { in decode() 188 int result = parse(string, i, base, negative); in decode() 357 int length = string.length(), i = 0; in parseInt() local 361 boolean negative = string.charAt(i) == '-'; in parseInt() [all …]
|
/libcore/benchmarks/src/benchmarks/ |
D | MethodInvocationBenchmark.java | 40 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 …]
|
D | AdditionBenchmark.java | 29 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/luni/src/test/java/tests/api/java/util/ |
D | WeakHashMapTest.java | 56 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 …]
|
D | BitSetTest.java | 87 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 …]
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicLongArray.java | 32 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 …]
|
D | AtomicIntegerArray.java | 33 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/tests/security/cert/ |
D | CertPathBuilder2Test.java | 85 for (int i = 0; i <invalidValues.length; i++) { in checkResult() 86 Security.setProperty(propName, invalidValues[i]); in checkResult() 88 if (!dtN.equals(invalidValues[i]) && !dtN.equals(dt)) { in checkResult() 120 for (int i = 0; i < invalidValues.length; i++) { in testGetInstance01() 122 CertPathBuilder.getInstance(invalidValues[i]); in testGetInstance01() 124 invalidValues[i]).concat(")")); in testGetInstance01() 129 for (int i = 0; i < validValues.length; i++) { in testGetInstance01() 130 cerPB = CertPathBuilder.getInstance(validValues[i]); in testGetInstance01() 131 assertEquals("Incorrect type", cerPB.getAlgorithm(), validValues[i]); in testGetInstance01() 155 for (int i = 0; i < invalidValues.length; i++) { in testGetInstance02() [all …]
|