]> Cypherpunks repositories - gostls13.git/commitdiff
names now println/panicln
authorKen Thompson <ken@golang.org>
Thu, 2 Oct 2008 22:37:15 +0000 (15:37 -0700)
committerKen Thompson <ken@golang.org>
Thu, 2 Oct 2008 22:37:15 +0000 (15:37 -0700)
bug fix in named-return

R=r
OCL=16377
CL=16377

src/cmd/6g/gen.c
src/cmd/gc/lex.c

index 6623c517f7c24ab6e5ae4fbfb0b26203ba5a0dfc..3c1c92947a63a81bc8ea814ec58bf56ddaabbbcc 100644 (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);
                }
        }
 
index 707b61aa1567cec76fb72deb05d11c6a2e27b683..ee19ab8ae8ba78c2e973517689bbc7918cdaa584 100644 (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,