Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.99
 
1.100
 
MAIN:ragge:20040509182657
 
trees.c
_>377377                                 nfree(p);
 378378                                 p = l->n_left;
 379379                                 nfree(l);
<> 380+                        case TEMP:
380381                         case NAME:
 381382                                 p->n_type = INCREF(l->n_type);
 382383                                 p->n_qual = INCQAL(l->n_qual);
     
 !
897898         rv = bcon(1);
 898899         df = s->n_df;
 899900         while (ISARY(ty)) {
<> 901+                int u = -df->ddim;
900902                 rv = buildtree(MUL, rv, df->ddim >= 0 ? bcon(df->ddim) :
<>901 -                    tempnode(-df->ddim, INT, 0, MKSUE(INT)));
  903+                    tempnode(&u, INT, 0, MKSUE(INT)));
902904                 df++;
 903905                 ty = DECREF(ty);
 904906         }
     
 !
14771479  * If nr == 0, return a node with a new number.
 14781480  */
 14791481 NODE *
<>1480 -tempnode(int nr, TWORD type, union dimfun *df, struct suedef *sue)
  1482+tempnode(int *nr, TWORD type, union dimfun *df, struct suedef *sue)
14811483 {
<>1482 -        NODE *r;
 1483 -        static int tvaloff;
  1484+        NODE *p, *r;
  1485+        int al, tsz;
14841486 
<>1485 -        r = block(TEMP, NIL, NIL, type, df, sue);
 1486 -        r->n_lval = nr == 0 ? ++tvaloff : nr;
 1487 -        return r;
  1487+        if (*nr == 0) {
  1488+                al = talign(type, sue);
  1489+                tsz = tsize(type, df, sue);
  1490+                *nr = upoff(tsz, al, &autooff);
  1491+                if (autooff > maxautooff)
  1492+                        maxautooff = autooff;
  1493+        }
  1494+#if 1
  1495+        p = block(OREG, NIL, NIL, type, df, sue);
  1496+        p->n_rval = FPREG;
  1497+        p->n_qual = 0;
  1498+        r = offcon(*nr, type, df, sue);
  1499+        p->n_lval = r->n_lval;
  1500+        nfree(r);
  1501+        return p;
  1502+#else
  1503+        type = INCREF(type);
  1504+        p = block(REG, NIL, NIL, type, df, sue);
  1505+        p->n_rval = FPREG;
  1506+        p->n_qual = 0;
  1507+        p = block(PLUS, p, offcon(*nr, type, df, sue), type, df, sue);
  1508+        p->n_qual = 0;
  1509+        return clocal(buildtree(UMUL, p, NIL));
  1510+#endif
14881511 }
 14891512 
 14901513 /*
     
 !
15051528         df = p->n_df;
 15061529         ty = p->n_type;
 15071530         while (ISARY(ty)) {
<> 1531+                int u = -df->ddim;
15081532                 rv = buildtree(MUL, rv, df->ddim >= 0 ? bcon(df->ddim) :
<>1509 -                    tempnode(-df->ddim, INT, 0, MKSUE(INT)));
  1533+                    tempnode(&u, INT, 0, MKSUE(INT)));
15101534                 df++;
 15111535                 ty = DECREF(ty);
 15121536         }
     
 !
17661790                 /* Only if type is not void */
 17671791                 q = p->n_right->n_left;
 17681792                 if (type != VOID) {
<>1769 -                        r = tempnode(0, q->n_type, q->n_df, q->n_sue);
 1770 -                        tval = r->n_lval;
  1793+                        r = tempnode(&tval, q->n_type, q->n_df, q->n_sue);
17711794                         q = buildtree(ASSIGN, r, q);
 17721795                 }
 17731796                 rmcops(q);
     
 !
17771800 
 17781801                 q = p->n_right->n_right;
 17791802                 if (type != VOID) {
<>1780 -                        r = tempnode(tval, q->n_type, q->n_df, q->n_sue);
  1803+                        r = tempnode(&tval, q->n_type, q->n_df, q->n_sue);
17811804                         q = buildtree(ASSIGN, r, q);
 17821805                 }
 17831806                 rmcops(q);
     
 !
17861809                 send_passt(IP_DEFLAB, lbl2);
 17871810 
 17881811                 nfree(p->n_right);
<>1789 -                p->n_op = p->n_type == VOID ? ICON : TEMP;
 1790 -                p->n_lval = tval;
  1812+                if (p->n_type != VOID) {
  1813+                        r = tempnode(&tval, p->n_type, p->n_df, p->n_sue);
  1814+                        *p = *r;
  1815+                        nfree(r);
  1816+                } else
  1817+                        p->n_op = ICON;
17911818                 break;
 17921819 
 17931820         case ULE:
     
 !
18091836                 r = talloc();
 18101837                 *r = *p;
 18111838                 andorbr(r, -1, lbl = getlab());
<>1812 -                q = tempnode(0, p->n_type, p->n_df, p->n_sue);
 1813 -                tval = q->n_lval;
 1814 -                r = tempnode(tval, p->n_type, p->n_df, p->n_sue);
  1839+                q = tempnode(&tval, p->n_type, p->n_df, p->n_sue);
  1840+                r = tempnode(&tval, p->n_type, p->n_df, p->n_sue);
18151841                 ecode(buildtree(ASSIGN, q, bcon(1)));
 18161842                 branch(lbl2 = getlab());
 18171843                 send_passt(IP_DEFLAB, lbl);
     
 !
18711897 delasgop(NODE *p)
 18721898 {
 18731899         NODE *q, *r;
<> 1900+        int tval;
18741901 
 18751902         if ((cdope(p->n_op)&ASGOPFLG) && p->n_op != RETURN && p->n_op != CAST) {
 18761903                 NODE *l = p->n_left;
 18771904                 NODE *ll = l->n_left;
 18781905 
 18791906                 if (has_se(l)) {
<>1880 -                        q = tempnode(0, ll->n_type, ll->n_df, ll->n_sue);
 1881 -                        r = tempnode(q->n_lval, ll->n_type, ll->n_df,ll->n_sue);
  1907+                        tval = 0;
  1908+                        q = tempnode(&tval, ll->n_type, ll->n_df, ll->n_sue);
  1909+                        r = tempnode(&tval, ll->n_type, ll->n_df,ll->n_sue);
18821910                         l->n_left = q;
 18831911                         /* Now the left side of node p has no side effects. */
 18841912                         /* side effects on the right side must be obeyed */
     
 !
20822110 storecall(NODE *p)
 20832111 {
 20842112         int o = p->n_op;
<>2085 -        int ty = optype(o);
  2113+        int ty = coptype(o);
20862114 
 20872115         if (ty == LTYPE)
 20882116                 return;
     
 !
21982226         SNAM(NOT,!)
 21992227         SNAM(CAST,CAST)
 22002228         SNAM(STRING,STRING)
<>2201 -        SNAM(ADDROF,U&)
22022229         SNAM(PLUSEQ,+=)
 22032230         SNAM(MINUSEQ,-=)
 22042231         SNAM(MULEQ,*=)
     
 !
22412268                 return UTYPE|LOGFLG;
 22422269         case CAST:
 22432270                 return BITYPE|ASGFLG|ASGOPFLG;
<>2244 -        case ADDROF:
 2245 -                return UTYPE;
<_22462271         case PLUSEQ:
 22472272                 return BITYPE|ASGFLG|ASGOPFLG|FLOFLG|SIMPFLG|COMMFLG;
 22482273         case MINUSEQ:
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 17:27 +0100