From: Robert Griesemer Date: Sat, 3 Nov 2018 05:21:23 +0000 (-0700) Subject: cmd/compile/internal/gc: remove isforw predicate table (cleanup) X-Git-Tag: go1.12beta1~501 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6fe8ee78e9b4870ebc1de2b5cfd6170a78a56c00;p=gostls13.git cmd/compile/internal/gc: remove isforw predicate table (cleanup) Was only ever filled with one Etype (TFORW) and only used in one place. Easier to just check for TFORW. Change-Id: Icc96da3a22b0af1d7e60bc5841c744916c53341e Reviewed-on: https://go-review.googlesource.com/c/147285 Reviewed-by: Martin Möhrmann --- diff --git a/src/cmd/compile/internal/gc/go.go b/src/cmd/compile/internal/gc/go.go index cfd695097f..471746ed7d 100644 --- a/src/cmd/compile/internal/gc/go.go +++ b/src/cmd/compile/internal/gc/go.go @@ -147,7 +147,6 @@ var asmhdr string var simtype [NTYPE]types.EType var ( - isforw [NTYPE]bool isInt [NTYPE]bool isFloat [NTYPE]bool isComplex [NTYPE]bool diff --git a/src/cmd/compile/internal/gc/reflect.go b/src/cmd/compile/internal/gc/reflect.go index e4008bd7e7..415d3cd594 100644 --- a/src/cmd/compile/internal/gc/reflect.go +++ b/src/cmd/compile/internal/gc/reflect.go @@ -1137,7 +1137,7 @@ func dtypesym(t *types.Type) *obj.LSym { return lsym } // TODO(mdempsky): Investigate whether this can happen. - if isforw[tbase.Etype] { + if tbase.Etype == TFORW { return lsym } } diff --git a/src/cmd/compile/internal/gc/universe.go b/src/cmd/compile/internal/gc/universe.go index 96980ad500..760a8e40b0 100644 --- a/src/cmd/compile/internal/gc/universe.go +++ b/src/cmd/compile/internal/gc/universe.go @@ -200,8 +200,6 @@ func typeinit() { isComplex[TCOMPLEX64] = true isComplex[TCOMPLEX128] = true - isforw[TFORW] = true - // initialize okfor for et := types.EType(0); et < NTYPE; et++ { if isInt[et] || et == TIDEAL {