llgo/ssa: rtType, rtFunc

This commit is contained in:
xushiwei
2024-04-27 17:39:25 +08:00
parent f1761c0c9c
commit 6a02c3ac4c
14 changed files with 259 additions and 19 deletions

View File

@@ -329,6 +329,9 @@ func (p *context) compileInstrAndValue(b llssa.Builder, iv instrAndValue) (ret l
return
}
panic("todo")
case *ssa.TypeAssert:
x := p.compileValue(b, v.X)
ret = b.TypeAssert(x, p.prog.Type(v.AssertedType), v.CommaOk)
default:
panic(fmt.Sprintf("compileInstrAndValue: unknown instr - %T\n", iv))
}