runtime: move *task.DeferFrame here

This is a refactor that makes the next commit simpler. Perhaps it should
have been like this from the beginning but I didn't like all the casts.
This commit is contained in:
Ayke van Laethem
2022-06-17 16:52:52 +02:00
committed by Ron Evans
parent 49e22fe678
commit 159f0051bb
7 changed files with 45 additions and 50 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ func (b *builder) deferInitFunc() {
// possibly broken by the C alloca function).
// The frame pointer is _not_ saved, because it is marked as clobbered
// in the setjmp-like inline assembly.
deferFrameType := b.getLLVMType(b.program.ImportedPackage("internal/task").Members["DeferFrame"].Type())
deferFrameType := b.getLLVMRuntimeType("deferFrame")
b.deferFrame = b.CreateAlloca(deferFrameType, "deferframe.buf")
stackPointer := b.readStackPointer()
b.createRuntimeCall("setupDeferFrame", []llvm.Value{b.deferFrame, stackPointer}, "")