Home
last modified time | relevance | path

Searched refs:head (Results 1 – 25 of 35) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/
DArrayDeque.java117 transient int head; field in ArrayDeque
152 if (tail < head || (tail == head && es[head] != null)) { in grow()
155 System.arraycopy(es, head, in grow()
156 es, head + newSpace, in grow()
157 oldCapacity - head); in grow()
158 for (int i = head, to = (head += newSpace); i < to; i++) in grow()
295 es[head = dec(head, es.length)] = e; in addFirst()
296 if (head == tail) in addFirst()
313 if (head == (tail = inc(tail, es.length))) in addLast()
386 E e = elementAt(es = elements, h = head); in pollFirst()
[all …]
DLinkedHashMap.java236 transient LinkedHashMap.Entry<K,V> head; field in LinkedHashMap
256 LinkedHashMap.Entry<K,V> first = head; in linkNodeAtEnd()
257 head = p; in linkNodeAtEnd()
268 head = p; in linkNodeAtEnd()
282 head = dst; in transferLinks()
295 head = tail = null; in reinitialize()
331 head = a; in afterNodeRemoval()
342 if (evict && (first = head) != null && removeEldestEntry(first)) { in afterNodeInsertion()
363 head = a; in afterNodeAccess()
371 head = p; in afterNodeAccess()
[all …]
DReverseOrderSortedSetView.java240 final E head; // head element, or negative infinity if null field in Subset
245 Subset(E head, E tail) { in Subset() argument
246 this.head = head; in Subset()
256 return head == null || cmp.compare(e, head) >= 0; in aboveHead()
360 return ReverseOrderSortedSetView.this.new Subset(head, to); in headSet()
DReverseOrderSortedMapView.java314 final K head; // head key, or negative infinity if null
318 Submap(K head, K tail) {
319 this.head = head;
325 return head == null || cmp.compare(k, head) >= 0;
461 return new Submap(head, to);
/libcore/tools/expected_upstream/
Dojluni_merge_to_main.py124 head = repo.head
125 index = IndexFile.from_tree(repo, head.commit)
130 commit = index.commit(message=msg, parent_commits=[head.commit], head=False)
201 repo: Repo, head: Head, new_entries: List[ExpectedUpstreamEntry],
234 entries = ExpectedUpstreamFile(head.commit.tree["EXPECTED_UPSTREAM"]
242 repo.head.reference = head
243 repo.head.reset(index=True)
246 index = IndexFile.from_tree(repo, head.commit)
261 commit = index.commit(message=msg, parent_commits=[head.commit], head=False)
262 new_head = head.set_commit(commit)
[all …]
Dojluni_refresh_files.py50 head_tree = repo.head.commit.tree
183 message=msg, parent_commits=[upstream_commit], head=False)
195 message=msg, parent_commits=[prev_head, first_commit], head=True)
/libcore/luni/src/main/java/java/lang/ref/
DFinalizerReference.java36 private static FinalizerReference<?> head = null; field in FinalizerReference
64 reference.next = head; in add()
65 if (head != null) { in add()
66 head.prev = reference; in add()
68 head = reference; in add()
82 head = next; in remove()
110 for (FinalizerReference<?> r = head; r != null; r = r.next) { in enqueueSentinelReference()
/libcore/ojluni/src/test/java/lang/ref/SoftReference/
DBashTest.java44 public static TestReference head; field in BashTest.TestReference
49 next = head; in TestReference()
50 head = this; in TestReference()
67 for (TestReference r = TestReference.head; r != null; r = r.next) { in test()
/libcore/ojluni/src/main/java/java/lang/ref/
DReferenceQueue.java48 private Reference<? extends T> head = null; field in ReferenceQueue
77 head = r; in enqueueLocked()
144 if (head != null) { in reallyPollLocked()
145 Reference<? extends T> r = head; in reallyPollLocked()
146 if (head == tail) { in reallyPollLocked()
148 head = null; in reallyPollLocked()
150 head = head.queueNext; in reallyPollLocked()
/libcore/ojluni/src/main/java/java/util/concurrent/
DLinkedBlockingQueue.java147 transient Node<E> head; field in LinkedBlockingQueue
215 Node<E> h = head; in dequeue()
218 head = first; in dequeue()
258 last = head = new Node<E>(null); in LinkedBlockingQueue()
504 return (count.get() > 0) ? head.next.item : null; in peek()
541 for (Node<E> pred = head, p = pred.next; in remove()
567 for (Node<E> p = head.next; p != null; p = p.next) in contains()
595 for (Node<E> p = head.next; p != null; p = p.next) in toArray()
648 for (Node<E> p = head.next; p != null; p = p.next) in toArray()
669 for (Node<E> p, h = head; (p = h.next) != null; h = p) { in clear()
[all …]
DLinkedTransferQueue.java489 transient volatile Node head; field in LinkedTransferQueue
600 : (h = head);; ) { in xfer()
604 if (h == null) h = head; in xfer()
696 Node h = head, p = h; in firstDataNode()
725 for (Node p = head; p != null;) { in countOfMode()
744 for (Node p = head; p != null;) { in toString()
773 for (Node p = head; p != null;) { in toArrayInternal()
876 for (Node p = (pred == null) ? head : pred.next, c = p; in advance()
894 c = p = head; in advance()
935 for (Node p = (pred == null) ? head : pred.next, c = p, q; in remove()
[all …]
DConcurrentLinkedQueue.java225 transient volatile Node<E> head; field in ConcurrentLinkedQueue
245 head = tail = new Node<E>(); in ConcurrentLinkedQueue()
268 head = h; in ConcurrentLinkedQueue()
303 p = head; in succ()
376 p = (t != (t = tail)) ? t : head; in offer()
385 for (Node<E> h = head, p = h, q;; p = q) { in poll()
406 for (Node<E> h = head, p = h, q;; p = q) { in peek()
429 for (Node<E> h = head, p = h, q;; p = q) { in first()
491 for (Node<E> p = head, pred = null; p != null; ) { in contains()
524 for (Node<E> p = head, pred = null; p != null; ) { in remove()
[all …]
DPhaser.java970 AtomicReference<QNode> head = (phase & 1) == 0 ? evenQ : oddQ; in releaseWaiters() local
971 while ((q = head.get()) != null && in releaseWaiters()
973 if (head.compareAndSet(q, q.next) && in releaseWaiters()
991 AtomicReference<QNode> head = (phase & 1) == 0 ? evenQ : oddQ; in abortWait() local
994 QNode q = head.get(); in abortWait()
998 if (head.compareAndSet(q, q.next) && t != null) { in abortWait()
1056 AtomicReference<QNode> head = (phase & 1) == 0 ? evenQ : oddQ; in internalAwaitAdvance() local
1057 QNode q = node.next = head.get(); in internalAwaitAdvance()
1060 queued = head.compareAndSet(q, node); in internalAwaitAdvance()
DSynchronousQueue.java313 volatile SNode head; field in SynchronousQueue.TransferStack
316 return h == head && in casHead()
364 SNode h = head; in transfer()
387 if (stat < 0 && h == null && head == s) { in transfer()
468 while ((p = head) != null && p != past && p.isCancelled()) in clean()
583 transient volatile QNode head; field in SynchronousQueue.TransferQueue
595 head = h; in TransferQueue()
604 if (h == head && in advanceHead()
658 QNode t = tail, h = head, m, tn; // m is node to fulfill in transfer()
716 } else if ((m = h.next) != null && t == tail && h == head) { in transfer()
[all …]
DArrayBlockingQueue.java833 private Node head; field in ArrayBlockingQueue.Itrs
863 p = head; in doSomeSweeping()
876 p = head; in doSomeSweeping()
888 head = next; in doSomeSweeping()
911 head = new Node(itr, head); in register()
922 for (Node o = null, p = head; p != null;) { in takeIndexWrapped()
931 head = next; in takeIndexWrapped()
939 if (head == null) // no more iterators to track in takeIndexWrapped()
949 for (Node o = null, p = head; p != null;) { in removedAt()
958 head = next; in removedAt()
[all …]
DConcurrentLinkedDeque.java267 private transient volatile Node<E> head; field in ConcurrentLinkedDeque
319 for (Node<E> h = head, p = h, q;;) { in linkFirst()
324 p = (h != (h = head)) ? h : q; in linkFirst()
569 while ((h = head).item == null && (p = h.prev) != null) { in updateHead()
580 else if (h != head) in updateHead()
712 for (Node<E> h = head, p = h, q;;) { in first()
717 p = (h != (h = head)) ? h : q; in first()
772 head = tail = new Node<E>(); in ConcurrentLinkedDeque()
815 head = h; in initHeadTail()
/libcore/ojluni/src/test/java/util/Collections/
DCheckedMapBash.java61 Object head = nil; in testCheckedMap() local
68 m.put(newHead, head); in testCheckedMap()
69 head = newHead; in testCheckedMap()
96 while (head != nil) { in testCheckedMap()
97 if (!m.containsKey(head)) in testCheckedMap()
99 Object newHead = m.get(head); in testCheckedMap()
102 m.remove(head); in testCheckedMap()
103 head = newHead; in testCheckedMap()
/libcore/dom/src/test/resources/
Dhc_nodtdstaff.svg1 …="0" y="0" width="100" height="100"/><head xmlns='http://www.w3.org/1999/xhtml'><title>hc_nodtdsta…
/libcore/ojluni/src/test/java/util/LinkedHashMap/
DBasic.java62 Integer head = nil; in testBasic() local
69 m.put(newHead, head); in testBasic()
70 head = newHead; in testBasic()
81 while (head != nil) { in testBasic()
82 Assert.assertTrue(m.containsKey(head)); in testBasic()
83 Integer newHead = m.get(head); in testBasic()
85 m.remove(head); in testBasic()
86 head = newHead; in testBasic()
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DStampedLock.java399 private transient volatile Node head; field in StampedLock
462 signalNext(head); in releaseWrite()
585 if (tail == head && (nextState = tryAcquireRead()) != 0L) in tryReadLock()
675 signalNext(head); in unlockRead()
754 signalNext(head); in tryConvertToReadLock()
796 signalNext(head); in tryConvertToOptimisticRead()
836 signalNext(head); in tryUnlockRead()
1091 signalNext(head); in unstampedUnlockRead()
1208 !(first = (head == pred))) { in acquireWrite()
1222 head = node; in acquireWrite()
[all …]
DAbstractQueuedSynchronizer.java514 private transient volatile Node head; field in AbstractQueuedSynchronizer
657 !(first = (head == pred))) { in acquire()
680 head = node; in acquire()
1008 signalNext(head); in release()
1095 signalNext(head); in releaseShared()
1112 for (Node p = tail, h = head; p != h && p != null; p = p.prev) in hasQueuedThreads()
1128 return head != null; in hasContended()
1144 if ((h = head) != null && ((s = h.next) == null || in getFirstQueuedThread()
1185 return (h = head) != null && (s = h.next) != null && in apparentlyFirstQueuedIsExclusive()
1234 if ((h = head) != null && ((s = h.next) == null || in hasQueuedPredecessors()
DAbstractQueuedLongSynchronizer.java149 private transient volatile Node head; field in AbstractQueuedLongSynchronizer
292 !(first = (head == pred))) { in acquire()
315 head = node; in acquire()
642 signalNext(head); in release()
729 signalNext(head); in releaseShared()
746 for (Node p = tail, h = head; p != h && p != null; p = p.prev) in hasQueuedThreads()
762 return head != null; in hasContended()
778 if ((h = head) != null && ((s = h.next) == null || in getFirstQueuedThread()
819 return (h = head) != null && (s = h.next) != null && in apparentlyFirstQueuedIsExclusive()
868 if ((h = head) != null && ((s = h.next) == null || in hasQueuedPredecessors()
/libcore/luni/src/test/java/libcore/java/util/
DOldTreeMapTest.java213 Map head = tm.headMap("100"); in test_headMapLjava_lang_Object() local
214 assertEquals("Returned map of incorrect size", 3, head.size()); in test_headMapLjava_lang_Object()
215 assertTrue("Returned incorrect elements", head.containsKey("0") in test_headMapLjava_lang_Object()
216 && head.containsValue(new Integer("1")) in test_headMapLjava_lang_Object()
217 && head.containsKey("10")); in test_headMapLjava_lang_Object()
262 assertTrue(head instanceof Serializable); in test_headMapLjava_lang_Object()
/libcore/tools/testmapping/
Dsave_logs.py81 (head, tail) = os.path.split(name)
83 name = head
/libcore/ojluni/annotations/hiddenapi/java/lang/ref/
DReferenceQueue.java76 private java.lang.ref.Reference<? extends T> head; field in ReferenceQueue

12