ssa: SliceToArrayPointer

This commit is contained in:
visualfc
2024-08-09 08:53:39 +08:00
parent 210c483635
commit 302386d22c
6 changed files with 287 additions and 0 deletions

View File

@@ -605,6 +605,10 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
}
}
ret = b.Select(states, v.Blocking)
case *ssa.SliceToArrayPointer:
t := b.Prog.Type(v.Type(), llssa.InGo)
x := p.compileValue(b, v.X)
ret = b.SliceToArrayPointer(x, t)
default:
panic(fmt.Sprintf("compileInstrAndValue: unknown instr - %T\n", iv))
}