compiler: refactor alloca/lifetime/wordpack code into separate package

This code is required by transformation passes which are being moved
into a separate package, but is too complicated to simply copy.
Therefore, I decided to move them into a new package.
This commit is contained in:
Ayke van Laethem
2019-11-13 18:08:24 +01:00
committed by Ayke
parent 009b27350e
commit 36d1198115
10 changed files with 264 additions and 197 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ func (c *Compiler) emitDefer(frame *Frame, instr *ssa.Defer) {
// Put this struct in an alloca.
alloca := c.builder.CreateAlloca(deferFrameType, "defer.alloca")
c.builder.CreateStore(deferFrame, alloca)
if c.needsStackObjects() {
if c.NeedsStackObjects() {
c.trackPointer(alloca)
}