runtime: unify fastrand1 and fastrand2

C and Go calling conventions are now compatible, so we
don't need two versions of this function.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/139080043
This commit is contained in:
Keith Randall 2014-09-02 14:33:33 -07:00
parent 1d8fa7fa5d
commit 3306d119b0
10 changed files with 10 additions and 26 deletions

View file

@ -219,7 +219,7 @@ func makemap(t *maptype, hint int64) *hmap {
h.count = 0
h.B = B
h.flags = 0
h.hash0 = fastrand2()
h.hash0 = fastrand1()
h.buckets = buckets
h.oldbuckets = nil
h.nevacuate = 0
@ -568,7 +568,7 @@ func mapiterinit(t *maptype, h *hmap, it *hiter) {
// iterator state
it.bucket = 0
it.offset = uint8(fastrand2() & (bucketCnt - 1))
it.offset = uint8(fastrand1() & (bucketCnt - 1))
it.done = false
it.bptr = nil