mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
compiler: move GC passes to the transform package
This commit is contained in:
committed by
Ron Evans
parent
3d3e48179e
commit
f0bb3c092d
@@ -137,8 +137,8 @@ func (c *Compiler) Optimize(optLevel, sizeLevel int, inlinerThreshold uint) erro
|
||||
builder.Populate(modPasses)
|
||||
modPasses.Run(c.mod)
|
||||
|
||||
hasGCPass := c.addGlobalsBitmap()
|
||||
hasGCPass = c.makeGCStackSlots() || hasGCPass
|
||||
hasGCPass := transform.AddGlobalsBitmap(c.mod)
|
||||
hasGCPass = transform.MakeGCStackSlots(c.mod) || hasGCPass
|
||||
if hasGCPass {
|
||||
if err := c.Verify(); err != nil {
|
||||
return errors.New("GC pass caused a verification failure")
|
||||
|
||||
Reference in New Issue
Block a user