Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.34
 
1.35
 
MAIN:ragge:20100811140844
 
optim.c
_>8383 NODE *
 8484 optim(NODE *p)
 8585 {
<>86 -        struct suedef *sue;
  86+        struct attr *ap;
8787         int o, ty;
 8888         NODE *sp, *q;
 8989         int i;
     
 !
123123                 /* paint over the type of the left hand side with the type of the top */
 124124                 p->n_left->n_type = p->n_type;
 125125                 p->n_left->n_df = p->n_df;
<>126 -                p->n_left->n_sue = p->n_sue;
  126+                p->n_left->n_ap = p->n_ap;
127127                 q = p->n_left;
 128128                 nfree(p);
 129129                 return q;
     
 !
134134                 goto setuleft;
 135135 
 136136         case RS:
<>137 -                GETSUE(sue, p->n_sue);
  137+                ap = attr_find(p->n_ap, ATTR_BASETYP);
138138 
 139139                 if (LO(p) == RS && RCON(p->n_left) && RCON(p) &&
<>140 -                    (RV(p) + RV(p->n_left)) < sue->suesize) {
  140+                    (RV(p) + RV(p->n_left)) < ap->atypsz) {
141141                         /* two right-shift  by constants */
 142142                         RV(p) += RV(p->n_left);
 143143                         p->n_left = zapleft(p->n_left);
     
 !
166166                         } else
 167167 #endif
 168168                         /* avoid larger shifts than type size */
<>169 -                        if (RV(p) >= sue->suesize) {
 170 -                                RV(p) = RV(p) % p->n_sue->suesize;
  169+                        if (RV(p) >= ap->atypsz) {
  170+                                RV(p) = RV(p) %
  171+                                    attr_find(p->n_ap, ATTR_BASETYP)->atypsz;
171172                                 werror("shift larger than type");
 172173                         }
 173174                         if (RV(p) == 0)
     
 !
176177                 break;
 177178 
 178179         case LS:
<>179 -                GETSUE(sue, p->n_sue);
  180+                ap = attr_find(p->n_ap, ATTR_BASETYP);
180181 
 181182                 if (LO(p) == LS && RCON(p->n_left) && RCON(p)) {
 182183                         /* two left-shift  by constants */
     
 !
204205                         } else
 205206 #endif
 206207                         /* avoid larger shifts than type size */
<>207 -                        if (RV(p) >= sue->suesize) {
 208 -                                RV(p) = RV(p) % p->n_sue->suesize;
  208+                        if (RV(p) >= ap->atypsz) {
  209+                                RV(p) = RV(p) %
  210+                                    attr_find(p->n_ap, ATTR_BASETYP)->atypsz;
209211                                 werror("shift larger than type");
 210212                         }
 211213                         if (RV(p) == 0
     
 !
262264                         zapright:
 263265                         nfree(p->n_right);
 264266                         q = makety(p->n_left, p->n_type, p->n_qual,
<>265 -                            p->n_df, p->n_sue);
  267+                            p->n_df, p->n_ap);
266268                         nfree(p);
 267269                         return clocal(q);
 268270                         }
     
 !
301303                         p->n_op = RS;
 302304                         RV(p) = i;
 303305                         q = p->n_right;
<>304 -                        if(tsize(q->n_type, q->n_df, q->n_sue) > SZINT)
 305 -                                p->n_right = makety(q, INT, 0, 0, MKSUE(INT));
  306+                        if(tsize(q->n_type, q->n_df, q->n_ap) > SZINT)
  307+                                p->n_right = makety(q, INT, 0, 0, MKAP(INT));
<_306308 
 307309                         break;
 308310                 }
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 13:07 +0100