runtime: use type int to specify size for newarray

Consistently use type int for the size argument of
runtime.newarray, runtime.reflect_unsafe_NewArray
and reflect.unsafe_NewArray.

Change-Id: Ic77bf2dde216c92ca8c49462f8eedc0385b6314e
Reviewed-on: https://go-review.googlesource.com/22311
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Martin Möhrmann 2016-04-20 18:00:52 +02:00 committed by Martin Möhrmann
parent 4938d7b5fc
commit 7e460e70d9
3 changed files with 8 additions and 8 deletions

View file

@ -246,7 +246,7 @@ func makemap(t *maptype, hint int64, h *hmap, bucket unsafe.Pointer) *hmap {
// If hint is large zeroing this memory could take a while.
buckets := bucket
if B != 0 {
buckets = newarray(t.bucket, uintptr(1)<<B)
buckets = newarray(t.bucket, 1<<B)
}
// initialize Hmap
@ -821,7 +821,7 @@ func hashGrow(t *maptype, h *hmap) {
throw("evacuation not done in time")
}
oldbuckets := h.buckets
newbuckets := newarray(t.bucket, uintptr(1)<<(h.B+1))
newbuckets := newarray(t.bucket, 1<<(h.B+1))
flags := h.flags &^ (iterator | oldIterator)
if h.flags&iterator != 0 {
flags |= oldIterator