]> Cypherpunks repositories - gostls13.git/commitdiff
delete dregs: inarggen, genpanic, regret
authorRuss Cox <rsc@golang.org>
Tue, 31 Mar 2009 00:15:54 +0000 (17:15 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 31 Mar 2009 00:15:54 +0000 (17:15 -0700)
R=ken
OCL=26916
CL=26918

src/cmd/6g/cgen.c
src/cmd/6g/gen.c
src/cmd/6g/gg.h
src/cmd/6g/gsubr.c

index 162617dcaadeff11846116a6bddb296584cc11ed..5a08a1522333399dfd00791e9196432df93f7308 100644 (file)
@@ -574,16 +574,6 @@ ret:
        ;
 }
 
-vlong
-fieldoffset(Type *t, Node *n)
-{
-       if(t->etype != TSTRUCT)
-               fatal("fieldoffset: not struct %lT", t);
-       if(n->op != ONAME)
-               fatal("fieldoffset: not field name %N", n);
-       return 0;
-}
-
 /*
  * generate:
  *     newreg = &n;
index 46c542aafd094305774cee6948b9976616ee474f..bf7c32d55b43b528cf9f5163e501a3625e4c5120 100644 (file)
@@ -79,8 +79,6 @@ compile(Node *fn)
        ptxt = gins(ATEXT, curfn->nname, &nod1);
        afunclit(&ptxt->from);
 
-//     inarggen();
-
        ginit();
        gen(curfn->enter);
        gen(curfn->nbody);
@@ -190,10 +188,6 @@ loop:
                n = n->right;
                goto loop;
 
-       case OPANIC:
-               genpanic();
-               break;
-
        case OCASE:
        case OFALL:
        case OXCASE:
@@ -375,26 +369,6 @@ ret:
        lineno = lno;
 }
 
-void
-inarggen(void)
-{
-       fatal("inarggen");
-}
-
-void
-genpanic(void)
-{
-       Node n1, n2;
-       Prog *p;
-
-       nodconst(&n1, types[TINT64], 0xf0);
-       nodreg(&n2, types[TINT64], D_AX);
-       gins(AMOVL, &n1, &n2);
-       p = pc;
-       gins(AMOVQ, &n2, N);
-       p->to.type = D_INDIR+D_AX;
-}
-
 /*
  * compute total size of f's in/out arguments.
  */
index 7fe47e1f5821ea35c85586fc95cc70851ab135d1..1aad145c134b111ab3571fdaef65dff9eb767b6c 100644 (file)
@@ -119,7 +119,6 @@ void        compile(Node*);
 void   proglist(void);
 void   gen(Node*);
 Node*  lookdot(Node*, Node*, int);
-void   inarggen(void);
 void   cgen_as(Node*, Node*);
 void   cgen_asop(Node*);
 void   cgen_ret(Node*);
@@ -132,7 +131,6 @@ void        cgen_div(int, Node*, Node*, Node*);
 void   cgen_bmul(int, Node*, Node*, Node*);
 void   cgen_shift(int, Node*, Node*, Node*);
 void   cgen_dcl(Node*);
-void   genpanic(void);
 int    needconvert(Type*, Type*);
 void   genconv(Type*, Type*);
 void   allocparams(void);
@@ -178,7 +176,6 @@ void        ginit(void);
 void   gclean(void);
 void   regalloc(Node*, Type*, Node*);
 void   regfree(Node*);
-void   regret(Node*, Type*);
 Node*  nodarg(Type*, int);
 void   nodreg(Node*, Type*, int);
 void   nodindreg(Node*, Type*, int);
index c0822644e731a4cb82ec86e1d6a9233461f14aba..da0f3256b77dc4ed5e6034c4c100b7872a856848 100644 (file)
@@ -239,14 +239,6 @@ regfree(Node *n)
        reg[i]--;
 }
 
-void
-regret(Node *n, Type *t)
-{
-       if(t == T)
-               fatal("regret: t nil");
-       fatal("regret");
-}
-
 /*
  * initialize n to be register r of type t.
  */