/libcore/ojluni/src/main/java/sun/misc/ |
D | Hashing.java | 48 int h = k.hashCode(); in singleWordWangJenkinsHash() local 50 h += (h << 15) ^ 0xffffcd7d; in singleWordWangJenkinsHash() 51 h ^= (h >>> 10); in singleWordWangJenkinsHash() 52 h += (h << 3); in singleWordWangJenkinsHash() 53 h ^= (h >>> 6); in singleWordWangJenkinsHash() 54 h += (h << 2) + (h << 14); in singleWordWangJenkinsHash() 55 return h ^ (h >>> 16); in singleWordWangJenkinsHash()
|
D | ASCIICaseInsensitiveComparator.java | 73 int h = 0; 77 h = 31*h + toLower(s.charAt(i)); 80 return h;
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/ |
D | DefaultHandlerTest.java | 37 private DefaultHandler h = new DefaultHandler(); field in DefaultHandlerTest 41 h.resolveEntity("publicID", "systemID"); in testResolveEntity() 51 h.notationDecl("name", "publicID", "systemID"); in testNotationDecl() 59 h.unparsedEntityDecl("name", "publicID", "systemID", in testUnparsedEntityDecl() 67 h.setDocumentLocator(new LocatorImpl()); in testSetDocumentLocator() 72 h.startDocument(); in testStartDocument() 80 h.endDocument(); in testEndDocument() 88 h.startPrefixMapping("prefix", "uri"); in testStartPrefixMapping() 96 h.endPrefixMapping("prefix"); in testEndPrefixMapping() 104 h.startElement("uri", "name", "qname", new AttributesImpl()); in testStartElement() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ |
D | HandlerBaseTest.java | 36 private HandlerBase h = new HandlerBase(); field in HandlerBaseTest 40 h.resolveEntity("publicID", "systemID"); in testResolveEntity() 47 h.notationDecl("name", "publicID", "systemID"); in testNotationDecl() 51 h.unparsedEntityDecl("name", "publicID", "systemID", "notationName"); in testUnparsedEntityDecl() 55 h.setDocumentLocator(new LocatorImpl()); in testSetDocumentLocator() 60 h.startDocument(); in testStartDocument() 68 h.endDocument(); in testEndDocument() 76 h.startElement("name", new AttributeListImpl()); in testStartElement() 84 h.endElement("name"); in testEndElement() 92 h.characters("The quick brown fox".toCharArray(), 4, 11); in testCharacters() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ext/ |
D | DefaultHandler2Test.java | 28 private DefaultHandler2 h = new DefaultHandler2(); field in DefaultHandler2Test 36 h.startCDATA(); in testStartCDATA() 44 h.endCDATA(); in testEndCDATA() 52 h.startDTD("name", "publicId", "systemId"); in testStartDTD() 60 h.endDTD(); in testEndDTD() 68 h.startEntity("name"); in testStartEntity() 76 h.endEntity("name"); in testEndEntity() 84 h.comment("<!-- Comment -->".toCharArray(), 0, 15); in testComment() 92 h.attributeDecl("eName", "aName", "type", "mode", "value"); in testAttributeDecl() 100 h.elementDecl("name", "model"); in testElementDecl() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | StampedLock.java | 509 WNode h; in unlockWrite() local 513 if ((h = whead) != null && h.status != 0) in unlockWrite() 514 release(h); in unlockWrite() 526 long s, m; WNode h; in unlockRead() local 533 if (m == RUNIT && (h = whead) != null && h.status != 0) in unlockRead() 534 release(h); in unlockRead() 552 long a = stamp & ABITS, m, s; WNode h; in unlock() local 560 if ((h = whead) != null && h.status != 0) in unlock() 561 release(h); in unlock() 568 if (m == RUNIT && (h = whead) != null && h.status != 0) in unlock() [all …]
|
D | AbstractQueuedLongSynchronizer.java | 220 Node h = head; in doReleaseShared() local 221 if (h != null && h != tail) { in doReleaseShared() 222 int ws = h.waitStatus; in doReleaseShared() 224 if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0)) in doReleaseShared() 226 unparkSuccessor(h); in doReleaseShared() 229 !h.compareAndSetWaitStatus(0, Node.PROPAGATE)) in doReleaseShared() 232 if (h == head) // loop if head changed in doReleaseShared() 246 Node h = head; // Record old head for check below in setHeadAndPropagate() local 264 if (propagate > 0 || h == null || h.waitStatus < 0 || in setHeadAndPropagate() 265 (h = head) == null || h.waitStatus < 0) { in setHeadAndPropagate() [all …]
|
D | AbstractQueuedSynchronizer.java | 687 Node h = head; in doReleaseShared() local 688 if (h != null && h != tail) { in doReleaseShared() 689 int ws = h.waitStatus; in doReleaseShared() 691 if (!h.compareAndSetWaitStatus(Node.SIGNAL, 0)) in doReleaseShared() 693 unparkSuccessor(h); in doReleaseShared() 696 !h.compareAndSetWaitStatus(0, Node.PROPAGATE)) in doReleaseShared() 699 if (h == head) // loop if head changed in doReleaseShared() 713 Node h = head; // Record old head for check below in setHeadAndPropagate() local 731 if (propagate > 0 || h == null || h.waitStatus < 0 || in setHeadAndPropagate() 732 (h = head) == null || h.waitStatus < 0) { in setHeadAndPropagate() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | RemoveIfTester.java | 37 for (int h = 0; h < 100; ++h) { in runBasicRemoveIfTests() 39 integers.add(h); in runBasicRemoveIfTests() 58 for (int h = 0; h < 100; ++h) { in runBasicRemoveIfTestsUnordered() 60 integers.add((h >>> 2) ^ (h >>> 5) ^ (h >>> 11) ^ (h >>> 17)); in runBasicRemoveIfTestsUnordered()
|
D | ObjectsTest.java | 74 Hello h = new Hello(); in test_hashCode() local 75 assertEquals(h.hashCode(), Objects.hashCode(h)); in test_hashCode() 80 Hello h = new Hello(); in test_requireNonNull_T() local 81 assertEquals(h, Objects.requireNonNull(h)); in test_requireNonNull_T() 91 Hello h = new Hello(); in test_requireNonNull_T_String() local 92 assertEquals(h, Objects.requireNonNull(h, "test")); in test_requireNonNull_T_String() 108 Hello h = new Hello(); in test_requireNonNull_T_Supplier() local 109 assertEquals(h, Objects.requireNonNull(h, () -> "test")); in test_requireNonNull_T_Supplier()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | SynchronousQueue.java | 276 boolean casHead(SNode h, SNode nh) { in casHead() argument 277 return h == head && in casHead() 278 U.compareAndSwapObject(this, HEAD, h, nh); in casHead() 325 SNode h = head; in transfer() local 326 if (h == null || h.mode == mode) { // empty or same-mode in transfer() 328 if (h != null && h.isCancelled()) in transfer() 329 casHead(h, h.next); // pop cancelled node in transfer() 332 } else if (casHead(h, s = snode(s, e, h, mode))) { in transfer() 338 if ((h = head) != null && h.next == s) in transfer() 339 casHead(h, s.next); // help s's fulfiller in transfer() [all …]
|
D | Exchanger.java | 348 for (int h = p.hash, spins = SPINS;;) { in arenaExchange() 353 p.hash = h; in arenaExchange() 357 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; // xorshift in arenaExchange() 358 if (h == 0) // initialize hash in arenaExchange() 359 h = SPINS | (int)t.getId(); in arenaExchange() 360 else if (h < 0 && // approx 50% true in arenaExchange() 381 p.hash = h; in arenaExchange() 454 int h = p.hash; in slotExchange() local 460 h ^= h << 1; h ^= h >>> 3; h ^= h << 10; in slotExchange() 461 if (h == 0) in slotExchange() [all …]
|
D | ConcurrentLinkedQueue.java | 224 Node<E> h = null, t = null; in ConcurrentLinkedQueue() local 227 if (h == null) in ConcurrentLinkedQueue() 228 h = t = newNode; in ConcurrentLinkedQueue() 234 if (h == null) in ConcurrentLinkedQueue() 235 h = t = newNode(null); in ConcurrentLinkedQueue() 236 head = h; in ConcurrentLinkedQueue() 258 final void updateHead(Node<E> h, Node<E> p) { in updateHead() argument 260 if (h != p && casHead(h, p)) in updateHead() 261 lazySetNext(h, h); in updateHead() 313 for (Node<E> h = head, p = h, q;;) { in poll() [all …]
|
D | ConcurrentLinkedDeque.java | 327 for (Node<E> h = head, p = h, q;;) { in linkFirst() 332 p = (h != (h = head)) ? h : q; in linkFirst() 342 if (p != h) // hop two nodes at a time in linkFirst() 343 casHead(h, newNode); // Failure is OK. in linkFirst() 573 Node<E> h, p, q; in updateHead() local 575 while ((h = head).item == null && (p = h.prev) != null) { in updateHead() 581 if (casHead(h, p)) in updateHead() 586 else if (h != head) in updateHead() 716 for (Node<E> h = head, p = h, q;;) { in first() 721 p = (h != (h = head)) ? h : q; in first() [all …]
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | BaseLocale.java | 154 int h = hash; in hashCode() local 155 if (h == 0) { in hashCode() 157 h = language.hashCode(); in hashCode() 158 h = 31 * h + script.hashCode(); in hashCode() 159 h = 31 * h + region.hashCode(); in hashCode() 160 h = 31 * h + variant.hashCode(); in hashCode() 161 hash = h; in hashCode() 163 return h; in hashCode() 188 int h = language.hashCode(); in Key() local 192 h = 31 * h + LocaleUtils.toLower(region.charAt(i)); in Key() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | HashtableTest.java | 57 Hashtable h = new Hashtable(); in test_Constructor() local 59 assertEquals("Created incorrect hashtable", 0, h.size()); in test_Constructor() 67 Hashtable h = new Hashtable(9); in test_ConstructorI() local 69 assertEquals("Created incorrect hashtable", 0, h.size()); in test_ConstructorI() 82 Hashtable h = new java.util.Hashtable(10, 0.5f); in test_ConstructorIF() local 83 assertEquals("Created incorrect hashtable", 0, h.size()); in test_ConstructorIF() 140 Hashtable h = hashtableClone(htfull); in test_clear() local 141 h.clear(); in test_clear() 142 assertEquals("Hashtable was not cleared", 0, h.size()); in test_clear() 143 Enumeration el = h.elements(); in test_clear() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldFormatterTest.java | 32 Handler h; field in OldFormatterTest 36 h = new StreamHandler(); in setUp() 47 assertEquals("head string is not empty", "", f.getHead(h)); in testGetHead() 48 h.publish(r); in testGetHead() 49 assertEquals("head string is not empty", "", f.getHead(h)); in testGetHead() 54 assertEquals("tail string is not empty", "", f.getTail(h)); in testGetTail() 55 h.publish(r); in testGetTail() 56 assertEquals("tail string is not empty", "", f.getTail(h)); in testGetTail()
|
/libcore/ojluni/src/main/java/java/security/spec/ |
D | ECParameterSpec.java | 45 private final int h; field in ECParameterSpec 61 BigInteger n, int h) { in ECParameterSpec() argument 74 if (h <= 0) { in ECParameterSpec() 80 this.h = h; in ECParameterSpec() 112 return h; in getCofactor()
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | Striped64.java | 194 int h; in longAccumulate() local 195 if ((h = getProbe()) == 0) { in longAccumulate() 197 h = getProbe(); in longAccumulate() 204 if ((a = as[(n - 1) & h]) == null) { in longAccumulate() 212 rs[j = (m - 1) & h] == null) { in longAccumulate() 243 h = advanceProbe(h); in longAccumulate() 249 rs[h & 1] = new Cell(x); in longAccumulate() 278 int h; in doubleAccumulate() local 279 if ((h = getProbe()) == 0) { in doubleAccumulate() 281 h = getProbe(); in doubleAccumulate() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | ArraysParallelSortHelpers.java | 132 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local 133 Relay fc = new Relay(new Merger<T>(s, w, a, wb, h, in compute() 134 wb+h, n-h, b, g, c)); in compute() 135 Relay rc = new Relay(new Merger<T>(fc, a, w, b+h, q, in compute() 136 b+u, n-u, wb+h, g, c)); in compute() 138 new Sorter<T>(rc, a, w, b+h, q, wb+h, g, c).fork();; in compute() 140 b+q, h-q, wb, g, c)); in compute() 141 new Sorter<T>(bc, a, w, b+q, h-q, wb+q, g, c).fork(); in compute() 250 int h = n >>> 1, q = h >>> 1, u = h + q; // quartiles in compute() local 251 Relay fc = new Relay(new Merger(s, w, a, wb, h, in compute() [all …]
|
D | ArrayDeque.java | 279 final int h = head; in pollFirst() local 281 E result = (E) elements[h]; in pollFirst() 284 elements[h] = null; // Must null out slot in pollFirst() 285 head = (h + 1) & (elements.length - 1); in pollFirst() 523 final int h = head; in delete() local 525 final int front = (i - h) & mask; in delete() 529 if (front >= ((t - h) & mask)) in delete() 534 if (h <= i) { in delete() 535 System.arraycopy(elements, h, elements, h + 1, front); in delete() 539 System.arraycopy(elements, h, elements, h + 1, mask - h); in delete() [all …]
|
D | Properties.java | 990 Hashtable h = new Hashtable(); in propertyNames() local 991 enumerate(h); in propertyNames() 992 return h.keys(); in propertyNames() 1014 Hashtable<String, String> h = new Hashtable<>(); in stringPropertyNames() local 1015 enumerateStringProperties(h); in stringPropertyNames() 1016 return h.keySet(); in stringPropertyNames() 1029 Hashtable h = new Hashtable(); in list() local 1030 enumerate(h); in list() 1031 for (Enumeration e = h.keys() ; e.hasMoreElements() ;) { in list() 1033 String val = (String)h.get(key); in list() [all …]
|
D | ArrayPrefixHelpers.java | 112 int th = threshold, org = origin, fnc = fence, l, h; in compute() local 114 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute() 115 if (h - l > th) { in compute() 118 int mid = (l + h) >>> 1; in compute() 120 new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h); in compute() 179 for (int i = first; i < h; ++i) // cumulate in compute() 182 else if (h < fnc) { // skip rightmost in compute() 184 for (int i = l + 1; i < h; ++i) // sum only in compute() 264 int th = threshold, org = origin, fnc = fence, l, h; in compute() local 266 outer: while ((l = t.lo) >= 0 && (h = t.hi) <= a.length) { in compute() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | ThreadLocal.java | 355 int h = key.threadLocalHashCode & (len - 1); in ThreadLocalMap() local 356 while (table[h] != null) in ThreadLocalMap() 357 h = nextIndex(h, len); in ThreadLocalMap() 358 table[h] = c; in ThreadLocalMap() 572 int h = k.threadLocalHashCode & (len - 1); in expungeStaleEntry() local 573 if (h != i) { in expungeStaleEntry() 578 while (tab[h] != null) in expungeStaleEntry() 579 h = nextIndex(h, len); in expungeStaleEntry() 580 tab[h] = e; in expungeStaleEntry() 657 int h = k.threadLocalHashCode & (newLen - 1); in resize() local [all …]
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | Extension.java | 240 int h = 0; in hashCode() local 245 h += len * val[--len]; in hashCode() 247 h = h * hashMagic + extensionId.hashCode(); in hashCode() 248 h = h * hashMagic + (critical?1231:1237); in hashCode() 249 return h; in hashCode()
|