mirror of
https://github.com/golang/go
synced 2024-11-18 16:04:44 -07:00
cmd/compile/internal/gc: unexport global variable Pc
Change-Id: Id2a9fc1e9e70eaf5f25ddc7476061e06abcf60e4 Reviewed-on: https://go-review.googlesource.com/30573 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
33faa4ebb9
commit
fc47ee2332
@ -1259,7 +1259,7 @@ func funccompile(n *Node) {
|
|||||||
funcdepth = n.Func.Depth + 1
|
funcdepth = n.Func.Depth + 1
|
||||||
compile(n)
|
compile(n)
|
||||||
Curfn = nil
|
Curfn = nil
|
||||||
Pc = nil
|
pc = nil
|
||||||
funcdepth = 0
|
funcdepth = 0
|
||||||
dclcontext = PEXTERN
|
dclcontext = PEXTERN
|
||||||
if nerrors != 0 {
|
if nerrors != 0 {
|
||||||
|
@ -274,7 +274,7 @@ var writearchive bool
|
|||||||
|
|
||||||
var Nacl bool
|
var Nacl bool
|
||||||
|
|
||||||
var Pc *obj.Prog
|
var pc *obj.Prog
|
||||||
|
|
||||||
var nodfp *Node
|
var nodfp *Node
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ import (
|
|||||||
func Prog(as obj.As) *obj.Prog {
|
func Prog(as obj.As) *obj.Prog {
|
||||||
var p *obj.Prog
|
var p *obj.Prog
|
||||||
|
|
||||||
p = Pc
|
p = pc
|
||||||
Pc = Ctxt.NewProg()
|
pc = Ctxt.NewProg()
|
||||||
Clearp(Pc)
|
Clearp(pc)
|
||||||
p.Link = Pc
|
p.Link = pc
|
||||||
|
|
||||||
if lineno == 0 && Debug['K'] != 0 {
|
if lineno == 0 && Debug['K'] != 0 {
|
||||||
Warn("prog: line 0")
|
Warn("prog: line 0")
|
||||||
@ -170,9 +170,9 @@ func Addrconst(a *obj.Addr, v int64) {
|
|||||||
func newplist() *obj.Plist {
|
func newplist() *obj.Plist {
|
||||||
pl := obj.Linknewplist(Ctxt)
|
pl := obj.Linknewplist(Ctxt)
|
||||||
|
|
||||||
Pc = Ctxt.NewProg()
|
pc = Ctxt.NewProg()
|
||||||
Clearp(Pc)
|
Clearp(pc)
|
||||||
pl.Firstpc = Pc
|
pl.Firstpc = pc
|
||||||
|
|
||||||
return pl
|
return pl
|
||||||
}
|
}
|
||||||
|
@ -4052,7 +4052,7 @@ type SSAGenState struct {
|
|||||||
|
|
||||||
// Pc returns the current Prog.
|
// Pc returns the current Prog.
|
||||||
func (s *SSAGenState) Pc() *obj.Prog {
|
func (s *SSAGenState) Pc() *obj.Prog {
|
||||||
return Pc
|
return pc
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetLineno sets the current source line number.
|
// SetLineno sets the current source line number.
|
||||||
@ -4077,7 +4077,7 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
|
|||||||
valueProgs = make(map[*obj.Prog]*ssa.Value, f.NumValues())
|
valueProgs = make(map[*obj.Prog]*ssa.Value, f.NumValues())
|
||||||
blockProgs = make(map[*obj.Prog]*ssa.Block, f.NumBlocks())
|
blockProgs = make(map[*obj.Prog]*ssa.Block, f.NumBlocks())
|
||||||
f.Logf("genssa %s\n", f.Name)
|
f.Logf("genssa %s\n", f.Name)
|
||||||
blockProgs[Pc] = f.Blocks[0]
|
blockProgs[pc] = f.Blocks[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
if Thearch.Use387 {
|
if Thearch.Use387 {
|
||||||
@ -4089,14 +4089,14 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
|
|||||||
|
|
||||||
// Emit basic blocks
|
// Emit basic blocks
|
||||||
for i, b := range f.Blocks {
|
for i, b := range f.Blocks {
|
||||||
s.bstart[b.ID] = Pc
|
s.bstart[b.ID] = pc
|
||||||
// Emit values in block
|
// Emit values in block
|
||||||
Thearch.SSAMarkMoves(&s, b)
|
Thearch.SSAMarkMoves(&s, b)
|
||||||
for _, v := range b.Values {
|
for _, v := range b.Values {
|
||||||
x := Pc
|
x := pc
|
||||||
Thearch.SSAGenValue(&s, v)
|
Thearch.SSAGenValue(&s, v)
|
||||||
if logProgs {
|
if logProgs {
|
||||||
for ; x != Pc; x = x.Link {
|
for ; x != pc; x = x.Link {
|
||||||
valueProgs[x] = v
|
valueProgs[x] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4110,10 +4110,10 @@ func genssa(f *ssa.Func, ptxt *obj.Prog, gcargs, gclocals *Sym) {
|
|||||||
// line numbers for otherwise empty blocks.
|
// line numbers for otherwise empty blocks.
|
||||||
next = f.Blocks[i+1]
|
next = f.Blocks[i+1]
|
||||||
}
|
}
|
||||||
x := Pc
|
x := pc
|
||||||
Thearch.SSAGenBlock(&s, b, next)
|
Thearch.SSAGenBlock(&s, b, next)
|
||||||
if logProgs {
|
if logProgs {
|
||||||
for ; x != Pc; x = x.Link {
|
for ; x != pc; x = x.Link {
|
||||||
blockProgs[x] = b
|
blockProgs[x] = b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user