Commit beb833f1 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ed6f2978
......@@ -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.
......
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