cl: compile ssa.Field

This commit is contained in:
visualfc
2024-06-11 10:23:00 +08:00
parent 1ecd9af2e1
commit a14974fbf2

View File

@@ -779,6 +779,9 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
t := v.Type()
x := p.compileValue(b, v.X)
ret = b.ChangeInterface(p.prog.Type(t, llssa.InGo), x)
case *ssa.Field:
x := p.compileValue(b, v.X)
ret = b.Field(x, v.Field)
default:
panic(fmt.Sprintf("compileInstrAndValue: unknown instr - %T\n", iv))
}