Commit 5aebeaac authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: 's avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
parent 318812e7
...@@ -37,11 +37,7 @@ import ( ...@@ -37,11 +37,7 @@ import (
"cmd/internal/src" "cmd/internal/src"
) )
var sharedProgArray *[10000]obj.Prog // *T instead of T to work around issue 19839 var sharedProgArray *[10000]obj.Prog = new([10000]obj.Prog) // *T instead of T to work around issue 19839
func init() {
sharedProgArray = new([10000]obj.Prog)
}
// Progs accumulates Progs for a function and converts them into machine code. // Progs accumulates Progs for a function and converts them into machine code.
type Progs struct { type Progs struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment