]> Cypherpunks repositories - gostls13.git/commit
runtime: make mTreap iterator bidirectional go1.12beta2
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 4 Jan 2019 20:17:15 +0000 (20:17 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 10 Jan 2019 18:15:48 +0000 (18:15 +0000)
commit4b3f04c63b5b1a1bbc4dfd71c34341ea4e935115
tree5da95c95bcc936225cc3e90ca5be87cf920d593f
parent44cf595a7efcd3d7048c745d1d1531696bcb5941
runtime: make mTreap iterator bidirectional

This change makes mTreap's iterator type, treapIter, bidirectional
instead of unidirectional. This change helps support moving the find
operation on a treap to return an iterator instead of a treapNode, in
order to hide the details of the treap when accessing elements.

For #28479.

Change-Id: I5dbea4fd4fb9bede6e81bfd089f2368886f98943
Reviewed-on: https://go-review.googlesource.com/c/156918
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/export_test.go
src/runtime/mgclarge.go
src/runtime/mheap.go