ssa: set method.name to pkg.name if private

This commit is contained in:
visualfc
2024-06-05 22:24:51 +08:00
parent 226fd29af8
commit 2fce2318ed
14 changed files with 1056 additions and 32 deletions

View File

@@ -113,7 +113,6 @@ func (p Program) Zero(t Type) Expr {
ret = llvm.ConstStruct(flds, false)
case *types.Slice:
ret = p.Zero(p.rtType("Slice")).impl
/* TODO(xsw):
case *types.Interface:
var name string
if u.Empty() {
@@ -122,7 +121,6 @@ func (p Program) Zero(t Type) Expr {
name = "Iface"
}
ret = p.Zero(p.rtType(name)).impl
*/
default:
log.Panicln("todo:", u)
}