runtime: use the tasks scheduler instead of coroutines

This results in smaller and likely more efficient code. It does require
some architecture specific code for each architecture, but I've kept the
amount of code as small as possible.
This commit is contained in:
Ayke van Laethem
2020-09-25 15:31:50 +02:00
committed by Ron Evans
parent 3b24fedf92
commit 9f5066aa6f
12 changed files with 510 additions and 8 deletions
+3
View File
@@ -34,6 +34,9 @@ func (b *builder) createGoInstruction(funcPtr llvm.Value, params []llvm.Value, p
} else {
// The stack size is fixed at compile time. By emitting it here as a
// constant, it can be optimized.
if b.DefaultStackSize == 0 {
b.addError(pos, "default stack size for goroutines is not set")
}
stackSize = llvm.ConstInt(b.uintptrType, b.DefaultStackSize, false)
}
case "coroutines":