mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: constify a test variable
Simple cleanup, no functionality change.
Change-Id: I8eceda4496a396e0117a0a601186c653982fb004
GitHub-Last-Rev: 58defc575e
GitHub-Pull-Request: golang/go#47389
Reviewed-on: https://go-review.googlesource.com/c/go/+/337289
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
90ed541149
commit
a35c5c98c0
3 changed files with 3 additions and 3 deletions
|
|
@ -198,7 +198,7 @@ func MemclrBytes(b []byte) {
|
||||||
memclrNoHeapPointers(s.array, uintptr(s.len))
|
memclrNoHeapPointers(s.array, uintptr(s.len))
|
||||||
}
|
}
|
||||||
|
|
||||||
var HashLoad = &hashLoad
|
const HashLoad = hashLoad
|
||||||
|
|
||||||
// entry point for testing
|
// entry point for testing
|
||||||
func GostringW(w []uint16) (s string) {
|
func GostringW(w []uint16) (s string) {
|
||||||
|
|
|
||||||
|
|
@ -473,7 +473,7 @@ func TestMapNanGrowIterator(t *testing.T) {
|
||||||
nan := math.NaN()
|
nan := math.NaN()
|
||||||
const nBuckets = 16
|
const nBuckets = 16
|
||||||
// To fill nBuckets buckets takes LOAD * nBuckets keys.
|
// To fill nBuckets buckets takes LOAD * nBuckets keys.
|
||||||
nKeys := int(nBuckets * *runtime.HashLoad)
|
nKeys := int(nBuckets * runtime.HashLoad)
|
||||||
|
|
||||||
// Get map to full point with nan keys.
|
// Get map to full point with nan keys.
|
||||||
for i := 0; i < nKeys; i++ {
|
for i := 0; i < nKeys; i++ {
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ func reflect_memmove(to, from unsafe.Pointer, n uintptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// exported value for testing
|
// exported value for testing
|
||||||
var hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
|
const hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
|
||||||
|
|
||||||
//go:nosplit
|
//go:nosplit
|
||||||
func fastrand() uint32 {
|
func fastrand() uint32 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue