ssa: sliceOf arrayOf

This commit is contained in:
visualfc
2024-05-26 21:57:07 +08:00
parent 4a6f072361
commit 3328847e27
9 changed files with 547 additions and 1 deletions

View File

@@ -121,6 +121,12 @@ func (b *Builder) TypeName(t types.Type) (ret string, pub bool) {
return b.StructName(t)
case *types.Signature:
return b.FuncName(t), true
case *types.Slice:
ret, pub = b.TypeName(t.Elem())
return "[]" + ret, pub
case *types.Array:
ret, pub = b.TypeName(t.Elem())
return fmt.Sprintf("[%v]%s", t.Len(), ret), pub
case *types.Named:
o := t.Obj()
return "_llgo_" + TypeName(o), o.Exported()