mirror of
https://github.com/golang/go
synced 2024-11-26 06:27:58 -07: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
@ -198,7 +198,7 @@ func MemclrBytes(b []byte) {
|
||||
memclrNoHeapPointers(s.array, uintptr(s.len))
|
||||
}
|
||||
|
||||
var HashLoad = &hashLoad
|
||||
const HashLoad = hashLoad
|
||||
|
||||
// entry point for testing
|
||||
func GostringW(w []uint16) (s string) {
|
||||
|
@ -473,7 +473,7 @@ func TestMapNanGrowIterator(t *testing.T) {
|
||||
nan := math.NaN()
|
||||
const nBuckets = 16
|
||||
// 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.
|
||||
for i := 0; i < nKeys; i++ {
|
||||
|
@ -119,7 +119,7 @@ func reflect_memmove(to, from unsafe.Pointer, n uintptr) {
|
||||
}
|
||||
|
||||
// exported value for testing
|
||||
var hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
|
||||
const hashLoad = float32(loadFactorNum) / float32(loadFactorDen)
|
||||
|
||||
//go:nosplit
|
||||
func fastrand() uint32 {
|
||||
|
Loading…
Reference in New Issue
Block a user