mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: move Linksym, linksymname, and isblanksym to types package
Response to code review feedback on CL 40693.
This CL was prepared by:
(1) manually adding new implementations and the Ctxt var to package types
(2) running eg with template:
func before(s *types.Sym) *obj.LSym { return gc.Linksym(s) }
func after(s *types.Sym) *obj.LSym { return s.Linksym() }
(3) running gofmt -r:
gofmt -r 'isblanksym(a) -> a.IsBlank()'
(4) manually removing old implementations from package gc
Passes toolstash-check.
Change-Id: I39c35def7cae5bcbcc7c77253e5d2b066b981dea
Reviewed-on: https://go-review.googlesource.com/41302
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
5aebeaaca2
commit
30940e2cc2
26 changed files with 98 additions and 96 deletions
|
|
@ -725,7 +725,7 @@ func fixedlit(ctxt initContext, kind initKind, n *Node, var_ *Node, init *Nodes)
|
|||
if r.Op != OSTRUCTKEY {
|
||||
Fatalf("fixedlit: rhs not OSTRUCTKEY: %v", r)
|
||||
}
|
||||
if isblanksym(r.Sym) {
|
||||
if r.Sym.IsBlank() {
|
||||
return nblank, r.Left
|
||||
}
|
||||
return nodSym(ODOT, var_, r.Sym), r.Left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue