Commit 53a22770 authored by Ken Thompson's avatar Ken Thompson

names now println/panicln

bug fix in named-return

R=r
OCL=16377
CL=16377
parent f21e731c
......@@ -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);
}
}
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment