]> Cypherpunks repositories - gostls13.git/commitdiff
6g: better genembedtramp fatal error,
authorRuss Cox <rsc@golang.org>
Tue, 20 Jan 2009 23:36:57 +0000 (15:36 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 20 Jan 2009 23:36:57 +0000 (15:36 -0800)
   and don't put inaccessible private methods
   in signature.

R=ken
OCL=23138
CL=23140

src/cmd/6g/obj.c
src/cmd/gc/subr.c

index fa2c59ddddf35f23c6ccc3ff963120f20b63418b..fb2d382a3cd7154112d5a45fa6fc3e2205732991 100644 (file)
@@ -537,7 +537,7 @@ genembedtramp(Type *t, Sig *b)
                if(c == 1)
                        goto out;
        }
-       fatal("genembedtramp");
+       fatal("genembedtramp %T.%s", t, b->name);
 
 out:
        if(d == 0)
index 428e7055197642f82af38014a6f3446af8a5c5ed..40912bce675ea0ceeec8bb63c74c2b9b7dce04e2 100644 (file)
@@ -2489,6 +2489,8 @@ expand0(Type *t)
        u = methtype(t);
        if(u != T) {
                for(f=u->method; f!=T; f=f->down) {
+                       if(!exportname(f->sym->name) && strcmp(f->sym->package, package) != 0)
+                               continue;
                        if(f->sym->uniq)
                                continue;
                        f->sym->uniq = 1;