ssa: chan send/recv

This commit is contained in:
visualfc
2024-07-02 20:12:12 +08:00
parent 0ead82ae21
commit 2153cf39b5
11 changed files with 190 additions and 1 deletions

View File

@@ -133,6 +133,7 @@ type aProgram struct {
rtIfaceTy llvm.Type
rtSliceTy llvm.Type
rtMapTy llvm.Type
rtChanTy llvm.Type
anyTy Type
voidTy Type
@@ -287,6 +288,13 @@ func (p Program) rtString() llvm.Type {
return p.rtStringTy
}
func (p Program) rtChan() llvm.Type {
if p.rtChanTy.IsNil() {
p.rtChanTy = p.rtType("Chan").ll
}
return p.rtChanTy
}
func (p Program) tyComplex64() llvm.Type {
if p.c64Type.IsNil() {
ctx := p.ctx