toLLVMFunc: closure

This commit is contained in:
xushiwei
2024-05-04 07:47:18 +08:00
parent 06d6b447e4
commit f07a62d136
7 changed files with 11 additions and 20 deletions

View File

@@ -114,11 +114,10 @@ type aProgram struct {
voidType llvm.Type
voidPtrTy llvm.Type
rtClosureTy llvm.Type
rtStringTy llvm.Type
rtIfaceTy llvm.Type
rtSliceTy llvm.Type
rtMapTy llvm.Type
rtStringTy llvm.Type
rtIfaceTy llvm.Type
rtSliceTy llvm.Type
rtMapTy llvm.Type
anyTy Type
voidTy Type
@@ -188,13 +187,6 @@ func (p Program) rtType(name string) Type {
return p.Type(p.rtNamed(name))
}
func (p Program) rtClosure() llvm.Type {
if p.rtClosureTy.IsNil() {
p.rtClosureTy = p.rtType("Closure").ll
}
return p.rtClosureTy
}
func (p Program) rtIface() llvm.Type {
if p.rtIfaceTy.IsNil() {
p.rtIfaceTy = p.rtType("Interface").ll