]> Cypherpunks repositories - gostls13.git/commit
runtime: use iterator instead of raw node for treap find
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 11 Feb 2019 17:20:59 +0000 (17:20 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 8 Apr 2019 15:41:43 +0000 (15:41 +0000)
commit7bb8fc10331eacc34bd38dc557a3856c8923c605
tree88660a56f17a254b27a48c96348adc102a1b7570
parent23d4c6cdd6712ba45ea4ec784bcb99cb883ab0ea
runtime: use iterator instead of raw node for treap find

Right now the mTreap structure exposes the treapNode structure through
only one interface: find. There's no reason (performance or otherwise)
for exposing this, and we get a cleaner abstraction through the
iterators this way. This change also makes it easier to make changes to
the mTreap implementation without violating its interface.

Change-Id: I5ef86b8ac81a47d05d8404df65af9ec5f419dc40
Reviewed-on: https://go-review.googlesource.com/c/go/+/164098
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mgclarge.go
src/runtime/mheap.go