mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change Oconv to take an Op parameter
Eliminates type conversions in a bunch of Oconv(int(n.Op), ...) calls. Notably, this identified a misuse of Oconv in amd64/gsubr.go to try to print an assembly instruction op instead of a compiler node op. Change-Id: I93b5aa49fe14a5eaf868b05426d3b8cd8ab52bc5 Reviewed-on: https://go-review.googlesource.com/20298 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
0de0cafb9f
commit
c3dfad5df9
29 changed files with 117 additions and 117 deletions
|
|
@ -943,8 +943,8 @@ func escassign(e *EscState, dst *Node, src *Node) {
|
|||
if Debug['m'] > 1 {
|
||||
fmt.Printf("%v:[%d] %v escassign: %v(%v)[%v] = %v(%v)[%v]\n",
|
||||
linestr(lineno), e.loopdepth, funcSym(Curfn),
|
||||
Nconv(dst, obj.FmtShort), Jconv(dst, obj.FmtShort), Oconv(int(dst.Op), 0),
|
||||
Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), Oconv(int(src.Op), 0))
|
||||
Nconv(dst, obj.FmtShort), Jconv(dst, obj.FmtShort), Oconv(dst.Op, 0),
|
||||
Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), Oconv(src.Op, 0))
|
||||
}
|
||||
|
||||
setlineno(dst)
|
||||
|
|
@ -1639,7 +1639,7 @@ func escwalkBody(e *EscState, level Level, dst *Node, src *Node, extraloopdepth
|
|||
|
||||
if Debug['m'] > 1 {
|
||||
fmt.Printf("escwalk: level:%d depth:%d %.*s op=%v %v(%v) scope:%v[%d] extraloopdepth=%v\n",
|
||||
level, e.pdepth, e.pdepth, "\t\t\t\t\t\t\t\t\t\t", Oconv(int(src.Op), 0), Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), e.curfnSym(src), srcE.Escloopdepth, extraloopdepth)
|
||||
level, e.pdepth, e.pdepth, "\t\t\t\t\t\t\t\t\t\t", Oconv(src.Op, 0), Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), e.curfnSym(src), srcE.Escloopdepth, extraloopdepth)
|
||||
}
|
||||
|
||||
e.pdepth++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue