Passes toostash-check.
Slightly reduce compiler binary size:
file before after Δ %
compile
21087288 21070776 -16512 -0.078%
total
131847020 131830508 -16512 -0.013%
file before after Δ %
cmd/compile/internal/gc.a
9007472 8999640 -7832 -0.087%
total
127117794 127109962 -7832 -0.006%
Change-Id: I4aadd68d0a7545770598bed9d3a4d05899b67b52
Reviewed-on: https://go-review.googlesource.com/c/go/+/205777
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
fn.Esc = EscFuncTagged
narg := 0
- for _, fs := range types.RecvsParams {
+ for _, fs := range &types.RecvsParams {
for _, f := range fs(fn.Type).Fields().Slice() {
narg++
f.Note = e.paramTag(fn, narg, f)
w.symIdx(n.Sym)
// Escape analysis.
- for _, fs := range types.RecvsParams {
+ for _, fs := range &types.RecvsParams {
for _, f := range fs(n.Type).FieldSlice() {
w.string(f.Note)
}
r.symIdx(n.Sym)
// Escape analysis.
- for _, fs := range types.RecvsParams {
+ for _, fs := range &types.RecvsParams {
for _, f := range fs(n.Type).FieldSlice() {
f.Note = r.string()
}
typecheckok = true
typs := runtimeTypes()
- for _, d := range runtimeDecls {
+ for _, d := range &runtimeDecls {
sym := Runtimepkg.Lookup(d.name)
typ := typs[d.typ]
switch d.tag {
}
func concurrentBackendAllowed() bool {
- for i, x := range Debug {
+ for i, x := range &Debug {
if x != 0 && !concurrentFlagOK[i] {
return false
}
}
n := p.nod(expr, op, p.expr(expr.X), nil)
var index [3]*Node
- for i, x := range expr.Index {
+ for i, x := range &expr.Index {
if x != nil {
index[i] = p.expr(x)
}
if v.Type.Etype != types.TTUPLE {
v.Fatalf("location pair %s has non-tuple type %v", loc, v.Type)
}
- for i, loc1 := range loc {
+ for i, loc1 := range &loc {
if loc1 == nil {
continue
}
var p4 []*sys.Arch
var p8 []*sys.Arch
var lwatomics []*sys.Arch
- for _, a := range sys.Archs {
+ for _, a := range &sys.Archs {
all = append(all, a)
if a.PtrSize == 4 {
p4 = append(p4, a)
// isBuiltinFuncName reports whether name matches a builtin function
// name.
func isBuiltinFuncName(name string) bool {
- for _, fn := range builtinFuncs {
+ for _, fn := range &builtinFuncs {
if fn.name == name {
return true
}
// lexinit initializes known symbols and the basic types.
func lexinit() {
- for _, s := range basicTypes {
+ for _, s := range &basicTypes {
etype := s.etype
if int(etype) >= len(types.Types) {
Fatalf("lexinit: %s bad etype", s.name)
asNode(s2.Def).Name = new(Name)
}
- for _, s := range builtinFuncs {
+ for _, s := range &builtinFuncs {
s2 := builtinpkg.Lookup(s.name)
s2.Def = asTypesNode(newname(s2))
asNode(s2.Def).SetSubOp(s.op)
}
- for _, s := range unsafeFuncs {
+ for _, s := range &unsafeFuncs {
s2 := unsafepkg.Lookup(s.name)
s2.Def = asTypesNode(newname(s2))
asNode(s2.Def).SetSubOp(s.op)
dowidth(types.Runetype)
// backend-dependent builtin types (e.g. int).
- for _, s := range typedefs {
+ for _, s := range &typedefs {
s1 := builtinpkg.Lookup(s.name)
sameas := s.sameas32