Commit 0a0f4bc1 authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by David Chase

cmd/compile/internal/gc: cleanup esc.go

* convert important functions to methods
* rename EscXXX to XXX in NodeEscState
* rename local variables more friendly
* simplify redundant code
* update comments

Change-Id: I8442bf4f8dde84523d9a2ad3d04b1cd326bd4719
Reviewed-on: https://go-review.googlesource.com/30893
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
parent 4940a837
This diff is collapsed.
......@@ -330,8 +330,8 @@ func (n *Node) jconv(s fmt.State, flag FmtFlag) {
fmt.Fprintf(s, " esc(%d)", n.Esc)
}
if e, ok := n.Opt().(*NodeEscState); ok && e.Escloopdepth != 0 {
fmt.Fprintf(s, " ld(%d)", e.Escloopdepth)
if e, ok := n.Opt().(*NodeEscState); ok && e.Loopdepth != 0 {
fmt.Fprintf(s, " ld(%d)", e.Loopdepth)
}
if c == 0 && n.Typecheck != 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment