diff options
| author | Michael Matloob <matloob@golang.org> | 2016-08-19 11:35:54 -0400 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2016-08-19 22:10:04 +0000 |
| commit | a072fc2e6714c20699ee627f88c5a5d5b948340f (patch) | |
| tree | 549943576854891df2cdcc09af01bf7a8ca52928 /src/cmd/link/internal/ld/deadcode.go | |
| parent | 0a2a64d85d52ad51de34d39bc5685c39c0e1e32a (diff) | |
| download | go-a072fc2e6714c20699ee627f88c5a5d5b948340f.tar.xz | |
cmd/link/internal: rename LSym to Symbol, and add a doc comment.
I'd also like to document some of its fields, but I don't know
what they are.
Change-Id: I87d341e255f785d351a8a73e645be668e02b2689
Reviewed-on: https://go-review.googlesource.com/27399
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/link/internal/ld/deadcode.go')
| -rw-r--r-- | src/cmd/link/internal/ld/deadcode.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/link/internal/ld/deadcode.go b/src/cmd/link/internal/ld/deadcode.go index aaed6cde21..8b59da34b6 100644 --- a/src/cmd/link/internal/ld/deadcode.go +++ b/src/cmd/link/internal/ld/deadcode.go @@ -119,7 +119,7 @@ func deadcode(ctxt *Link) { } // Remove dead text but keep file information (z symbols). - textp := make([]*LSym, 0, len(ctxt.Textp)) + textp := make([]*Symbol, 0, len(ctxt.Textp)) for _, s := range ctxt.Textp { if s.Attr.Reachable() { textp = append(textp, s) @@ -154,11 +154,11 @@ var markextra = []string{ // the reflect.method struct: mtyp, ifn, and tfn. type methodref struct { m methodsig - src *LSym // receiver type symbol + src *Symbol // receiver type symbol r [3]*Reloc // R_METHODOFF relocations to fields of runtime.method } -func (m methodref) ifn() *LSym { return m.r[1].Sym } +func (m methodref) ifn() *Symbol { return m.r[1].Sym } func (m methodref) isExported() bool { for _, r := range m.m { @@ -170,7 +170,7 @@ func (m methodref) isExported() bool { // deadcodepass holds state for the deadcode flood fill. type deadcodepass struct { ctxt *Link - markQueue []*LSym // symbols to flood fill in next pass + markQueue []*Symbol // symbols to flood fill in next pass ifaceMethod map[methodsig]bool // methods declared in reached interfaces markableMethods []methodref // methods of reached types reflectMethod bool @@ -189,7 +189,7 @@ func (d *deadcodepass) cleanupReloc(r *Reloc) { } // mark appends a symbol to the mark queue for flood filling. -func (d *deadcodepass) mark(s, parent *LSym) { +func (d *deadcodepass) mark(s, parent *Symbol) { if s == nil || s.Attr.Reachable() { return } |
