]> Cypherpunks repositories - gostls13.git/commitdiff
depricate panicln
authorKen Thompson <ken@golang.org>
Wed, 24 Mar 2010 23:53:54 +0000 (16:53 -0700)
committerKen Thompson <ken@golang.org>
Wed, 24 Mar 2010 23:53:54 +0000 (16:53 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/743041

src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/print.c
src/cmd/gc/subr.c
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c

index 9b4ab47312ce4a3e55996b598f4b97019b10ceff..9de2361194fbfcbf3dd9092a92c5250dbd0fa92d 100644 (file)
@@ -376,7 +376,7 @@ enum
        ONEW,
        ONOT, OCOM, OPLUS, OMINUS,
        OOROR,
-       OPANIC, OPANICN, OPRINT, OPRINTN,
+       OPANIC, OPRINT, OPRINTN,
        OSEND, OSENDNB,
        OSLICE, OSLICEARR, OSLICESTR,
        ORECV,
index c3a430665bbd612555cd6bfc51acd7d9e6297456..6489e7bee307cb46112098b349883c6bee9a804c 100644 (file)
@@ -1305,7 +1305,6 @@ static    struct
        "make",         LNAME,          Txxx,           OMAKE,
        "new",          LNAME,          Txxx,           ONEW,
        "panic",        LNAME,          Txxx,           OPANIC,
-       "panicln",      LNAME,          Txxx,           OPANICN,
        "print",        LNAME,          Txxx,           OPRINT,
        "println",      LNAME,          Txxx,           OPRINTN,
        "real",         LNAME,          Txxx,           OREAL,
index af69202838c2f6327d55770fbeecef821a92add2..79c0e3720ffa3f590b2fd5a62fb5236724f7d1ec 100644 (file)
@@ -48,7 +48,6 @@ exprfmt(Fmt *f, Node *n, int prec)
        case OMAKE:
        case ONEW:
        case OPANIC:
-       case OPANICN:
        case OPRINT:
        case OPRINTN:
        case OCALL:
@@ -351,7 +350,6 @@ exprfmt(Fmt *f, Node *n, int prec)
        case OMAKE:
        case ONEW:
        case OPANIC:
-       case OPANICN:
        case OPRINT:
        case OPRINTN:
                fmtprint(f, "%#O(", n->op);
index 0c01e728ce972475181b803ea1ed4ff1f0800224..b38ea9dfb9fdc352057caa313d23d123c84261cd 100644 (file)
@@ -832,7 +832,6 @@ goopnames[] =
        [ONOT]          = "!",
        [OOROR]         = "||",
        [OOR]           = "|",
-       [OPANICN]       = "panicln",
        [OPANIC]        = "panic",
        [OPLUS]         = "+",
        [OPRINTN]       = "println",
index a7ea631e1cb625445292d5b8e230eacb84111327..d10bf8f74bb549138367313b2e01eeecad4ee9fa 100644 (file)
@@ -1013,7 +1013,6 @@ reswitch:
                goto ret;
 
        case OPANIC:
-       case OPANICN:
        case OPRINT:
        case OPRINTN:
                ok |= Etop;
index 3820a58ff3bd661fcb2b3105e0ee010c08565b01..9c904f14c68d7aba92766f57a7b11c8eb1b9edff 100644 (file)
@@ -54,7 +54,6 @@ loop:
        case OGOTO:
        case ORETURN:
        case OPANIC:
-       case OPANICN:
                return 0;
                break;
        }
@@ -374,7 +373,6 @@ walkstmt(Node **np)
        case OPRINT:
        case OPRINTN:
        case OPANIC:
-       case OPANICN:
        case OEMPTY:
                if(n->typecheck == 0)
                        fatal("missing typecheck");
@@ -411,7 +409,6 @@ walkstmt(Node **np)
                case OPRINT:
                case OPRINTN:
                case OPANIC:
-               case OPANICN:
                        walkexprlist(n->left->list, &n->ninit);
                        n->left = walkprint(n->left, &n->ninit, 1);
                        break;
@@ -612,7 +609,6 @@ walkexpr(Node **np, NodeList **init)
        case OPRINT:
        case OPRINTN:
        case OPANIC:
-       case OPANICN:
                walkexprlist(n->list, init);
                n = walkprint(n, init, 0);
                goto ret;
@@ -1712,7 +1708,7 @@ walkprint(Node *nn, NodeList **init, int defer)
                        else
                                calls = list(calls, mkcall("printsp", T, init));
                }
-               notfirst = op == OPRINTN || op == OPANICN;
+               notfirst = op == OPRINTN;
 
                n = l->n;
                if(n->op == OLITERAL) {
@@ -1828,7 +1824,7 @@ walkprint(Node *nn, NodeList **init, int defer)
        if(defer) {
                if(op == OPRINTN)
                        fmtprint(&fmt, "\n");
-               if(op == OPANIC || op == OPANICN)
+               if(op == OPANIC)
                        fmtprint(&fmt, "%%!");
                on = syslook("printf", 1);
                on->type = functype(nil, intypes, nil);
@@ -1845,7 +1841,7 @@ walkprint(Node *nn, NodeList **init, int defer)
                typechecklist(calls, Etop);
                walkexprlist(calls, init);
 
-               if(op == OPANIC || op == OPANICN)
+               if(op == OPANIC)
                        r = mkcall("panicl", T, nil);
                else
                        r = nod(OEMPTY, N, N);