mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: clean up methodsym
Convert yyerrors into Fatals. Remove the goto. Move variable declaration closer to use. Unify printing strings a bit. Convert an int param into a bool. Passes toolstash-check. No compiler performance impact. Change-Id: I9017681417b785cf8693d18b124ac4f1ff37f2b5 Reviewed-on: https://go-review.googlesource.com/39170 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
3237af2da8
commit
2f072a427a
4 changed files with 27 additions and 41 deletions
|
|
@ -356,8 +356,8 @@ func methods(t *Type) []*Sig {
|
|||
sig.pkg = method.Pkg
|
||||
}
|
||||
|
||||
sig.isym = methodsym(method, it, 1)
|
||||
sig.tsym = methodsym(method, t, 0)
|
||||
sig.isym = methodsym(method, it, true)
|
||||
sig.tsym = methodsym(method, t, false)
|
||||
sig.type_ = methodfunc(f.Type, t)
|
||||
sig.mtype = methodfunc(f.Type, nil)
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ func imethods(t *Type) []*Sig {
|
|||
// IfaceType.Method is not in the reflect data.
|
||||
// Generate the method body, so that compiled
|
||||
// code can refer to it.
|
||||
isym := methodsym(method, t, 0)
|
||||
isym := methodsym(method, t, false)
|
||||
if !isym.Siggen() {
|
||||
isym.SetSiggen(true)
|
||||
genwrapper(t, f, isym, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue