llgo/ssa: Imethod

This commit is contained in:
xushiwei
2024-05-27 09:46:07 +08:00
parent eba08334d1
commit 8536fe4987
6 changed files with 41 additions and 78 deletions

View File

@@ -560,8 +560,9 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
cv := v.Call.Value
if mthd := v.Call.Method; mthd != nil {
o := p.compileValue(b, cv)
fn := b.Imethod(o, v.Call.Method)
args := p.compileValues(b, v.Call.Args, fnNormal)
ret = b.Icall(o, v.Call.Method, args...)
b.Call(fn, args...)
break
}
kind := p.funcKind(cv)