mirror of
https://github.com/golang/go.git
synced 2025-05-14 11:54:38 +00:00
stop looking for type names beginning with _.
they're gone. R=ken OCL=17569 CL=17569
This commit is contained in:
parent
aacfbb461b
commit
1a149ca1be
@ -46,7 +46,7 @@ dumpprereq(Type *t)
|
|||||||
return;
|
return;
|
||||||
t->printed = 1;
|
t->printed = 1;
|
||||||
|
|
||||||
if(t->sym != S && t->etype != TFIELD && t->sym->name[0] != '_')
|
if(t->sym != S && t->etype != TFIELD)
|
||||||
dumpsym(t->sym);
|
dumpsym(t->sym);
|
||||||
dumpprereq(t->type);
|
dumpprereq(t->type);
|
||||||
dumpprereq(t->down);
|
dumpprereq(t->down);
|
||||||
|
@ -963,7 +963,6 @@ Tpretty(Fmt *fp, Type *t)
|
|||||||
|
|
||||||
if(t->etype != TFIELD
|
if(t->etype != TFIELD
|
||||||
&& t->sym != S
|
&& t->sym != S
|
||||||
&& t->sym->name[0] != '_'
|
|
||||||
&& !(fp->flags&FmtLong)) {
|
&& !(fp->flags&FmtLong)) {
|
||||||
s = t->sym;
|
s = t->sym;
|
||||||
if(t == types[t->etype] || t == types[TSTRING])
|
if(t == types[t->etype] || t == types[TSTRING])
|
||||||
@ -1117,10 +1116,8 @@ Tconv(Fmt *fp)
|
|||||||
et = t->etype;
|
et = t->etype;
|
||||||
|
|
||||||
strcpy(buf, "");
|
strcpy(buf, "");
|
||||||
if(t->sym != S) {
|
if(t->sym != S)
|
||||||
if(t->sym->name[0] != '_')
|
|
||||||
snprint(buf, sizeof(buf), "<%S>", t->sym);
|
snprint(buf, sizeof(buf), "<%S>", t->sym);
|
||||||
}
|
|
||||||
|
|
||||||
switch(et) {
|
switch(et) {
|
||||||
default:
|
default:
|
||||||
@ -1479,7 +1476,7 @@ ismethod(Type *t)
|
|||||||
|
|
||||||
// direct receiver
|
// direct receiver
|
||||||
s = t->sym;
|
s = t->sym;
|
||||||
if(s != S && s->name[0] != '_') {
|
if(s != S) {
|
||||||
if(t->methptr == 2)
|
if(t->methptr == 2)
|
||||||
goto both;
|
goto both;
|
||||||
t->methptr |= 1;
|
t->methptr |= 1;
|
||||||
@ -1495,7 +1492,7 @@ ismethod(Type *t)
|
|||||||
return T;
|
return T;
|
||||||
|
|
||||||
s = t->sym;
|
s = t->sym;
|
||||||
if(s != S && s->name[0] != '_') {
|
if(s != S) {
|
||||||
if(t->methptr == 1)
|
if(t->methptr == 1)
|
||||||
goto both;
|
goto both;
|
||||||
t->methptr |= 2;
|
t->methptr |= 2;
|
||||||
@ -1616,14 +1613,14 @@ signame(Type *t, int block)
|
|||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
s = t->sym;
|
s = t->sym;
|
||||||
if(s == S || s->name[0] == '_') {
|
if(s == S) {
|
||||||
if(isptr[t->etype]) {
|
if(isptr[t->etype]) {
|
||||||
t = t->type;
|
t = t->type;
|
||||||
if(t == T)
|
if(t == T)
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
s = t->sym;
|
s = t->sym;
|
||||||
if(s == S || s->name[0] == '_')
|
if(s == S)
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user