llgo/ssa: Call to support closure

This commit is contained in:
xushiwei
2024-05-03 23:49:52 +08:00
parent f1bb42f554
commit 809a400f57
6 changed files with 106 additions and 10 deletions

View File

@@ -437,12 +437,9 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
panic("todo")
}
default:
panic("todo")
/*
fn := p.compileValue(b, cv)
args := p.compileValues(b, call.Args, kind)
ret = b.Call(fn, args...)
*/
fn := p.compileValue(b, cv)
args := p.compileValues(b, call.Args, kind)
ret = b.Call(fn, args...)
}
case *ssa.BinOp:
x := p.compileValue(b, v.X)