Skip to content

Commit

Permalink
cmd/compile/internal/gc: remove isforw predicate table (cleanup)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer committed Nov 3, 2018
1 parent f2cd0fa commit 6fe8ee7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/cmd/compile/internal/gc/go.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/reflect.go
Expand Up @@ -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
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/cmd/compile/internal/gc/universe.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 6fe8ee7

Please sign in to comment.