Commit 623dfd1b authored by Ken Thompson's avatar Ken Thompson

depricate panicln

R=rsc
CC=golang-dev
https://golang.org/cl/743041
parent 325cf8ef
...@@ -376,7 +376,7 @@ enum ...@@ -376,7 +376,7 @@ enum
ONEW, ONEW,
ONOT, OCOM, OPLUS, OMINUS, ONOT, OCOM, OPLUS, OMINUS,
OOROR, OOROR,
OPANIC, OPANICN, OPRINT, OPRINTN, OPANIC, OPRINT, OPRINTN,
OSEND, OSENDNB, OSEND, OSENDNB,
OSLICE, OSLICEARR, OSLICESTR, OSLICE, OSLICEARR, OSLICESTR,
ORECV, ORECV,
......
...@@ -1305,7 +1305,6 @@ static struct ...@@ -1305,7 +1305,6 @@ static struct
"make", LNAME, Txxx, OMAKE, "make", LNAME, Txxx, OMAKE,
"new", LNAME, Txxx, ONEW, "new", LNAME, Txxx, ONEW,
"panic", LNAME, Txxx, OPANIC, "panic", LNAME, Txxx, OPANIC,
"panicln", LNAME, Txxx, OPANICN,
"print", LNAME, Txxx, OPRINT, "print", LNAME, Txxx, OPRINT,
"println", LNAME, Txxx, OPRINTN, "println", LNAME, Txxx, OPRINTN,
"real", LNAME, Txxx, OREAL, "real", LNAME, Txxx, OREAL,
......
...@@ -48,7 +48,6 @@ exprfmt(Fmt *f, Node *n, int prec) ...@@ -48,7 +48,6 @@ exprfmt(Fmt *f, Node *n, int prec)
case OMAKE: case OMAKE:
case ONEW: case ONEW:
case OPANIC: case OPANIC:
case OPANICN:
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
case OCALL: case OCALL:
...@@ -351,7 +350,6 @@ exprfmt(Fmt *f, Node *n, int prec) ...@@ -351,7 +350,6 @@ exprfmt(Fmt *f, Node *n, int prec)
case OMAKE: case OMAKE:
case ONEW: case ONEW:
case OPANIC: case OPANIC:
case OPANICN:
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
fmtprint(f, "%#O(", n->op); fmtprint(f, "%#O(", n->op);
......
...@@ -832,7 +832,6 @@ goopnames[] = ...@@ -832,7 +832,6 @@ goopnames[] =
[ONOT] = "!", [ONOT] = "!",
[OOROR] = "||", [OOROR] = "||",
[OOR] = "|", [OOR] = "|",
[OPANICN] = "panicln",
[OPANIC] = "panic", [OPANIC] = "panic",
[OPLUS] = "+", [OPLUS] = "+",
[OPRINTN] = "println", [OPRINTN] = "println",
......
...@@ -1013,7 +1013,6 @@ reswitch: ...@@ -1013,7 +1013,6 @@ reswitch:
goto ret; goto ret;
case OPANIC: case OPANIC:
case OPANICN:
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
ok |= Etop; ok |= Etop;
......
...@@ -54,7 +54,6 @@ loop: ...@@ -54,7 +54,6 @@ loop:
case OGOTO: case OGOTO:
case ORETURN: case ORETURN:
case OPANIC: case OPANIC:
case OPANICN:
return 0; return 0;
break; break;
} }
...@@ -374,7 +373,6 @@ walkstmt(Node **np) ...@@ -374,7 +373,6 @@ walkstmt(Node **np)
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
case OPANIC: case OPANIC:
case OPANICN:
case OEMPTY: case OEMPTY:
if(n->typecheck == 0) if(n->typecheck == 0)
fatal("missing typecheck"); fatal("missing typecheck");
...@@ -411,7 +409,6 @@ walkstmt(Node **np) ...@@ -411,7 +409,6 @@ walkstmt(Node **np)
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
case OPANIC: case OPANIC:
case OPANICN:
walkexprlist(n->left->list, &n->ninit); walkexprlist(n->left->list, &n->ninit);
n->left = walkprint(n->left, &n->ninit, 1); n->left = walkprint(n->left, &n->ninit, 1);
break; break;
...@@ -612,7 +609,6 @@ walkexpr(Node **np, NodeList **init) ...@@ -612,7 +609,6 @@ walkexpr(Node **np, NodeList **init)
case OPRINT: case OPRINT:
case OPRINTN: case OPRINTN:
case OPANIC: case OPANIC:
case OPANICN:
walkexprlist(n->list, init); walkexprlist(n->list, init);
n = walkprint(n, init, 0); n = walkprint(n, init, 0);
goto ret; goto ret;
...@@ -1712,7 +1708,7 @@ walkprint(Node *nn, NodeList **init, int defer) ...@@ -1712,7 +1708,7 @@ walkprint(Node *nn, NodeList **init, int defer)
else else
calls = list(calls, mkcall("printsp", T, init)); calls = list(calls, mkcall("printsp", T, init));
} }
notfirst = op == OPRINTN || op == OPANICN; notfirst = op == OPRINTN;
n = l->n; n = l->n;
if(n->op == OLITERAL) { if(n->op == OLITERAL) {
...@@ -1828,7 +1824,7 @@ walkprint(Node *nn, NodeList **init, int defer) ...@@ -1828,7 +1824,7 @@ walkprint(Node *nn, NodeList **init, int defer)
if(defer) { if(defer) {
if(op == OPRINTN) if(op == OPRINTN)
fmtprint(&fmt, "\n"); fmtprint(&fmt, "\n");
if(op == OPANIC || op == OPANICN) if(op == OPANIC)
fmtprint(&fmt, "%%!"); fmtprint(&fmt, "%%!");
on = syslook("printf", 1); on = syslook("printf", 1);
on->type = functype(nil, intypes, nil); on->type = functype(nil, intypes, nil);
...@@ -1845,7 +1841,7 @@ walkprint(Node *nn, NodeList **init, int defer) ...@@ -1845,7 +1841,7 @@ walkprint(Node *nn, NodeList **init, int defer)
typechecklist(calls, Etop); typechecklist(calls, Etop);
walkexprlist(calls, init); walkexprlist(calls, init);
if(op == OPANIC || op == OPANICN) if(op == OPANIC)
r = mkcall("panicl", T, nil); r = mkcall("panicl", T, nil);
else else
r = nod(OEMPTY, N, N); r = nod(OEMPTY, N, N);
......
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