1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:14:49 -07:00

6g: error messages

part 2; missing files

R=ken
OCL=28408
CL=28410
This commit is contained in:
Russ Cox 2009-05-07 10:30:22 -07:00
parent b5e212ffdd
commit 88a1aa8e1a
2 changed files with 15 additions and 5 deletions

View File

@ -151,14 +151,23 @@ int
listcount(Node *n)
{
int v;
Iter s;
v = 0;
while(n != N) {
for(n = listfirst(&s, &n); n != N; n = listnext(&s))
v++;
return v;
}
int
structcount(Type *t)
{
int v;
Iter s;
v = 0;
for(t = structfirst(&s, &t); t != T; t = structnext(&s))
v++;
if(n->op != OLIST)
break;
n = n->right;
}
return v;
}

View File

@ -797,6 +797,7 @@ void dodclconst(Node*, Node*);
void defaultlit(Node*, Type*);
void defaultlit2(Node*, Node*);
int listcount(Node*);
int structcount(Type*);
void addmethod(Node*, Type*, int);
Node* methodname(Node*, Type*);
Sym* methodsym(Sym*, Type*);