1
0
mirror of https://github.com/golang/go synced 2024-11-26 08:17:59 -07:00

cmd/compile: remove unused Label fields

Updates #16357.

Change-Id: I37f04d83134b5e1e7f6ba44eb9a566758ef594d3
Reviewed-on: https://go-review.googlesource.com/29350
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2016-09-16 11:26:41 -07:00
parent 833ed7c431
commit 9f447c20ef
3 changed files with 0 additions and 23 deletions

View File

@ -8,9 +8,6 @@ package gc
import "fmt" import "fmt"
// TODO: labellist should become part of a "compilation state" for functions.
var labellist []*Label
func Sysfunc(name string) *Node { func Sysfunc(name string) *Node {
n := newname(Pkglookup(name, Runtimepkg)) n := newname(Pkglookup(name, Runtimepkg))
n.Class = PFUNC n.Class = PFUNC
@ -182,13 +179,6 @@ func moveToHeap(n *Node) {
} }
} }
func clearlabels() {
for _, l := range labellist {
l.Sym.Label = nil
}
labellist = labellist[:0]
}
// make a new Node off the books // make a new Node off the books
func tempname(nn *Node, t *Type) { func tempname(nn *Node, t *Type) {
if Curfn == nil { if Curfn == nil {

View File

@ -54,17 +54,7 @@ type Sym struct {
} }
type Label struct { type Label struct {
Sym *Sym
Def *Node Def *Node
Use []*Node
// for use during gen
Gotopc *obj.Prog // pointer to unresolved gotos
Labelpc *obj.Prog // pointer to code
Breakpc *obj.Prog // pointer to code
Continpc *obj.Prog // pointer to code
Used bool // for "label defined and not used" error
} }
type SymFlags uint8 type SymFlags uint8

View File

@ -338,9 +338,6 @@ func compile(fn *Node) {
saveerrors() saveerrors()
// set up domain for labels
clearlabels()
if Curfn.Type.FuncType().Outnamed { if Curfn.Type.FuncType().Outnamed {
// add clearing of the output parameters // add clearing of the output parameters
for _, t := range Curfn.Type.Results().Fields().Slice() { for _, t := range Curfn.Type.Results().Fields().Slice() {