Commit 9f447c20 authored by Matthew Dempsky's avatar Matthew Dempsky

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 833ed7c4
...@@ -8,9 +8,6 @@ package gc ...@@ -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) { ...@@ -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 {
......
...@@ -54,17 +54,7 @@ type Sym struct { ...@@ -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
......
...@@ -338,9 +338,6 @@ func compile(fn *Node) { ...@@ -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() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment