1
0
mirror of https://github.com/golang/go synced 2024-11-27 05:11:22 -07:00

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 <moehrmann@google.com>
This commit is contained in:
Robert Griesemer 2018-11-02 22:21:23 -07:00
parent f2cd0fa7b7
commit 6fe8ee78e9
3 changed files with 1 additions and 4 deletions

View File

@ -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

View File

@ -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
}
}

View File

@ -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 {