cmd/compile: simplify sharedProgArray init

Per code review feedback on CL 40693.

Change-Id: I38c522022a3c2f3e61ea90181391edb5c178916e
Reviewed-on: https://go-review.googlesource.com/41300
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-21 06:49:29 -07:00
parent 318812e7c1
commit 5aebeaaca2

View file

@ -37,11 +37,7 @@ import (
"cmd/internal/src"
)
var sharedProgArray *[10000]obj.Prog // *T instead of T to work around issue 19839
func init() {
sharedProgArray = new([10000]obj.Prog)
}
var sharedProgArray *[10000]obj.Prog = new([10000]obj.Prog) // *T instead of T to work around issue 19839
// Progs accumulates Progs for a function and converts them into machine code.
type Progs struct {