goroutine support; llgo/ssa: memory (malloc/free)

This commit is contained in:
xushiwei
2024-06-01 15:52:54 +08:00
parent 33ba94e784
commit e5802853c0
7 changed files with 535 additions and 319 deletions

View File

@@ -142,21 +142,6 @@ func (b Builder) Unreachable() {
b.impl.CreateUnreachable()
}
// The Go instruction creates a new goroutine and calls the specified
// function within it.
//
// Example printed form:
//
// go println(t0, t1)
// go t3()
// go invoke t5.Println(...t6)
func (b Builder) Go(fn Expr, args ...Expr) {
if debugInstr {
logCall("Go", fn, args)
}
b.Call(fn, args...)
}
// Return emits a return instruction.
func (b Builder) Return(results ...Expr) {
if debugInstr {