mirror of https://github.com/golang/go.git
cmd/compile: initialize SSA runtime functions in initssaconfig
This is a better home for it. Change-Id: I7ce96c16378d841613edaa53c07347b0ac99ea6e Reviewed-on: https://go-review.googlesource.com/38970 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
ed6f2978a2
commit
beb833f124
|
|
@ -250,25 +250,6 @@ func (s *ssafn) AllocFrame(f *ssa.Func) {
|
|||
}
|
||||
|
||||
func compile(fn *Node) {
|
||||
if Newproc == nil {
|
||||
Newproc = Sysfunc("newproc")
|
||||
Deferproc = Sysfunc("deferproc")
|
||||
Deferreturn = Sysfunc("deferreturn")
|
||||
Duffcopy = Sysfunc("duffcopy")
|
||||
Duffzero = Sysfunc("duffzero")
|
||||
panicindex = Sysfunc("panicindex")
|
||||
panicslice = Sysfunc("panicslice")
|
||||
panicdivide = Sysfunc("panicdivide")
|
||||
growslice = Sysfunc("growslice")
|
||||
panicdottypeE = Sysfunc("panicdottypeE")
|
||||
panicdottypeI = Sysfunc("panicdottypeI")
|
||||
panicnildottype = Sysfunc("panicnildottype")
|
||||
assertE2I = Sysfunc("assertE2I")
|
||||
assertE2I2 = Sysfunc("assertE2I2")
|
||||
assertI2I = Sysfunc("assertI2I")
|
||||
assertI2I2 = Sysfunc("assertI2I2")
|
||||
}
|
||||
|
||||
Curfn = fn
|
||||
dowidth(fn.Type)
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,24 @@ func initssaconfig() {
|
|||
ssaConfig.Set387(thearch.Use387)
|
||||
}
|
||||
ssaCache = new(ssa.Cache)
|
||||
|
||||
// Set up some runtime functions we'll need to call.
|
||||
Newproc = Sysfunc("newproc")
|
||||
Deferproc = Sysfunc("deferproc")
|
||||
Deferreturn = Sysfunc("deferreturn")
|
||||
Duffcopy = Sysfunc("duffcopy")
|
||||
Duffzero = Sysfunc("duffzero")
|
||||
panicindex = Sysfunc("panicindex")
|
||||
panicslice = Sysfunc("panicslice")
|
||||
panicdivide = Sysfunc("panicdivide")
|
||||
growslice = Sysfunc("growslice")
|
||||
panicdottypeE = Sysfunc("panicdottypeE")
|
||||
panicdottypeI = Sysfunc("panicdottypeI")
|
||||
panicnildottype = Sysfunc("panicnildottype")
|
||||
assertE2I = Sysfunc("assertE2I")
|
||||
assertE2I2 = Sysfunc("assertE2I2")
|
||||
assertI2I = Sysfunc("assertI2I")
|
||||
assertI2I2 = Sysfunc("assertI2I2")
|
||||
}
|
||||
|
||||
// buildssa builds an SSA function.
|
||||
|
|
|
|||
Loading…
Reference in New Issue