1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:14:43 -07:00

names now println/panicln

bug fix in named-return

R=r
OCL=16377
CL=16377
This commit is contained in:
Ken Thompson 2008-10-02 15:37:15 -07:00
parent f21e731c71
commit 53a22770a7
2 changed files with 5 additions and 4 deletions

View File

@ -21,6 +21,7 @@ compile(Node *fn)
Prog *ptxt;
int32 lno;
Type *t;
Iter save;
if(newproc == N) {
newproc = nod(ONAME, N, N);
@ -59,12 +60,12 @@ if(throwreturn == N) {
if(curfn->type->outnamed) {
// add clearing of the output parameters
t = structfirst(&pl, getoutarg(curfn->type));
t = structfirst(&save, getoutarg(curfn->type));
while(t != T) {
if(t->nname != N && t->nname->sym->name[0] != '_') {
curfn->nbody = list(nod(OAS, t->nname, N), curfn->nbody);
}
t = structnext(&pl);
t = structnext(&save);
}
}

View File

@ -998,9 +998,9 @@ static struct
"nil", LNIL, Txxx,
"package", LPACKAGE, Txxx,
"panic", LPANIC, Txxx,
"panicn", LPANICN, Txxx,
"panicln", LPANICN, Txxx,
"print", LPRINT, Txxx,
"printn", LPRINTN, Txxx,
"println", LPRINTN, Txxx,
"range", LRANGE, Txxx,
"return", LRETURN, Txxx,
"select", LSELECT, Txxx,