mirror of
https://github.com/golang/go
synced 2024-11-19 20:34:42 -07:00
[dev.debug] cmd/compile: rename some locals in genssa
When we start tracking the mapping from Value to Prog, valueProgs will be confusing. Disambiguate. Change-Id: Ib3b302fedb7eb0ff1bde789d70a11656d82f0897 Reviewed-on: https://go-review.googlesource.com/50876 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
045f605ea1
commit
c1c08a13e7
@ -4382,14 +4382,14 @@ func genssa(f *ssa.Func, pp *Progs) {
|
|||||||
// Remember where each block starts.
|
// Remember where each block starts.
|
||||||
s.bstart = make([]*obj.Prog, f.NumBlocks())
|
s.bstart = make([]*obj.Prog, f.NumBlocks())
|
||||||
s.pp = pp
|
s.pp = pp
|
||||||
var valueProgs map[*obj.Prog]*ssa.Value
|
var progToValue map[*obj.Prog]*ssa.Value
|
||||||
var blockProgs map[*obj.Prog]*ssa.Block
|
var progToBlock map[*obj.Prog]*ssa.Block
|
||||||
var logProgs = e.log
|
var logProgs = e.log
|
||||||
if logProgs {
|
if logProgs {
|
||||||
valueProgs = make(map[*obj.Prog]*ssa.Value, f.NumValues())
|
progToValue = make(map[*obj.Prog]*ssa.Value, f.NumValues())
|
||||||
blockProgs = make(map[*obj.Prog]*ssa.Block, f.NumBlocks())
|
progToBlock = make(map[*obj.Prog]*ssa.Block, f.NumBlocks())
|
||||||
f.Logf("genssa %s\n", f.Name)
|
f.Logf("genssa %s\n", f.Name)
|
||||||
blockProgs[s.pp.next] = f.Blocks[0]
|
progToBlock[s.pp.next] = f.Blocks[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
if thearch.Use387 {
|
if thearch.Use387 {
|
||||||
@ -4446,7 +4446,7 @@ func genssa(f *ssa.Func, pp *Progs) {
|
|||||||
|
|
||||||
if logProgs {
|
if logProgs {
|
||||||
for ; x != s.pp.next; x = x.Link {
|
for ; x != s.pp.next; x = x.Link {
|
||||||
valueProgs[x] = v
|
progToValue[x] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4464,7 +4464,7 @@ func genssa(f *ssa.Func, pp *Progs) {
|
|||||||
thearch.SSAGenBlock(&s, b, next)
|
thearch.SSAGenBlock(&s, b, next)
|
||||||
if logProgs {
|
if logProgs {
|
||||||
for ; x != s.pp.next; x = x.Link {
|
for ; x != s.pp.next; x = x.Link {
|
||||||
blockProgs[x] = b
|
progToBlock[x] = b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4477,9 +4477,9 @@ func genssa(f *ssa.Func, pp *Progs) {
|
|||||||
if logProgs {
|
if logProgs {
|
||||||
for p := pp.Text; p != nil; p = p.Link {
|
for p := pp.Text; p != nil; p = p.Link {
|
||||||
var s string
|
var s string
|
||||||
if v, ok := valueProgs[p]; ok {
|
if v, ok := progToValue[p]; ok {
|
||||||
s = v.String()
|
s = v.String()
|
||||||
} else if b, ok := blockProgs[p]; ok {
|
} else if b, ok := progToBlock[p]; ok {
|
||||||
s = b.String()
|
s = b.String()
|
||||||
} else {
|
} else {
|
||||||
s = " " // most value and branch strings are 2-3 characters long
|
s = " " // most value and branch strings are 2-3 characters long
|
||||||
@ -4497,9 +4497,9 @@ func genssa(f *ssa.Func, pp *Progs) {
|
|||||||
buf.WriteString("<dl class=\"ssa-gen\">")
|
buf.WriteString("<dl class=\"ssa-gen\">")
|
||||||
for p := pp.Text; p != nil; p = p.Link {
|
for p := pp.Text; p != nil; p = p.Link {
|
||||||
buf.WriteString("<dt class=\"ssa-prog-src\">")
|
buf.WriteString("<dt class=\"ssa-prog-src\">")
|
||||||
if v, ok := valueProgs[p]; ok {
|
if v, ok := progToValue[p]; ok {
|
||||||
buf.WriteString(v.HTML())
|
buf.WriteString(v.HTML())
|
||||||
} else if b, ok := blockProgs[p]; ok {
|
} else if b, ok := progToBlock[p]; ok {
|
||||||
buf.WriteString(b.HTML())
|
buf.WriteString(b.HTML())
|
||||||
}
|
}
|
||||||
buf.WriteString("</dt>")
|
buf.WriteString("</dt>")
|
||||||
|
Loading…
Reference in New Issue
Block a user