From 5aebeaaca2c8221cc9ad0a0c8d8af46cd453955b Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Fri, 21 Apr 2017 06:49:29 -0700 Subject: [PATCH] cmd/compile: simplify sharedProgArray init MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Per code review feedback on CL 40693. Change-Id: I38c522022a3c2f3e61ea90181391edb5c178916e Reviewed-on: https://go-review.googlesource.com/41300 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Daniel Martí Reviewed-by: Robert Griesemer --- src/cmd/compile/internal/gc/gsubr.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cmd/compile/internal/gc/gsubr.go b/src/cmd/compile/internal/gc/gsubr.go index 99dec575f4..24497f40f5 100644 --- a/src/cmd/compile/internal/gc/gsubr.go +++ b/src/cmd/compile/internal/gc/gsubr.go @@ -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 { -- 2.48.1