Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.29
 
1.30
 
MAIN:ragge:20030730112747
 
reader.c
_>1111 
 1212 int nrecur;
 1313 int lflag;
<>14 -extern int Wflag;
1514 int x2debug;
 1615 int udebug = 0;
<>17 -int vdebug = 0;
1816 
 1917 OFFSZ tmpoff/* offset for first temporary, in bits for current block */
 2018 OFFSZ maxoff/* maximum temporary offset over all blocks in current ftn, in bits */
     
 !
111109 {
 112110         static int myftn = -1;
 113111 
<>114 -        tmpoff = baseoff = (unsigned int) aoff;
  112+        tmpoff = baseoff = aoff;
115113         maxtreg = myreg;
 116114         if( myftn != ftnno ){ /* beginning of function */
 117115                 maxoff = baseoff;
     
 !
145143         for (;;) {
 146144                 canon(p);  /* creats OREG from * if possible and does sucomp */
 147145                 stotree = NIL;
<>148 -# ifndef BUG4
  146+#ifdef PCC_DEBUG
149147                 if (e2debug) {
 150148                         printf("store called on:\n");
 151149                         fwalk(p, e2print, 0);
 152150                 }
<>153 -# endif
  151+#endif
154152                 store(p);
 155153                 if( stotree==NIL ) break;
 156154 
     
 !
161159         order( p, cookie );
 162160 }
 163161 
<>164 -# ifndef BUG4
  162+#ifdef PCC_DEBUG
165163 char *cnames[] = {
 166164         "SANY",
 167165         "SAREG",
     
 !
173171         "SCON",
 174172         "SFLD",
 175173         "SOREG",
<>176 -# ifdef WCARD1
 177 -        "WCARD1",
 178 -# else
179174         "STARNM",
<>180 -# endif
 181 -# ifdef WCARD2
 182 -        "WCARD2",
 183 -# else
184175         "STARREG",
<>185 -# endif
186176         "INTEMP",
 187177         "FORARG",
 188178         "SWADD",
     
 !
201191                 if( cookie == SZERO ) printf( "SZERO" );
 202192                 else if( cookie == SONE ) printf( "SONE" );
 203193                 else if( cookie == SMONE ) printf( "SMONE" );
<>204 -                else if( cookie == SCCON ) printf( "SCCON" );
 205 -                else if( cookie == SSCON ) printf( "SSCON" );
 206 -                else if( cookie == SSOREG ) printf( "SSOREG" );
  194+                else if( cookie == SCCON ) printf( "SCCON" ); /* XXX 4.4 */
  195+                else if( cookie == SSCON ) printf( "SSCON" ); /* XXX 4.4 */
  196+                else if( cookie == SSOREG ) printf( "SSOREG" ); /* XXX 4.4 */
207197                 else printf( "SPECIAL+%d", cookie & ~SPECIAL );
 208198                 return;
 209199                 }
     
 !
218208                 }
 219209 
 220210 }
<>221 -# endif
  211+#endif
222212 
 223213 int odebug = 0;
 224214 
     
 !
229219         int cookie;
 230220         NODE *p1, *p2;
 231221 
<>232 -        cookie = cook;
 233 -        rcount();
 234 -        canon(p);
 235 -        rallo(p, p->n_rall);
 236 -        goto first;
 237 -
 238 -
239222         /*
 240223          * by this time, p should be able to be generated without stores;
 241224          * the only question is how
     
 !
248231         rcount();
 249232         canon(p);
 250233         rallo(p, p->n_rall);
<>251 -        /*
 252 -         * if any rewriting and canonicalization has put
 253 -         * the tree (p) into a shape that cook is happy
 254 -         * with (exclusive of FOREFF, FORREW, and INTEMP)
 255 -         * then we are done.
 256 -         * this allows us to call order with shapes in
 257 -         * addition to cookies and stop short if possible.
 258 -         */
 259 -        if (tshape(p, cook &(~(FOREFF|FORREW|INTEMP))))
 260 -                return;
261234 
<>262 -        first:
 263 -# ifndef BUG4
  235+#ifdef PCC_DEBUG
264236         if (odebug) {
 265237                 printf("order(%p, ", p);
 266238                 prcook(cookie);
 267239                 printf(")\n");
 268240                 fwalk(p, e2print, 0);
 269241         }
<>270 -# endif
  242+#endif
271243 
 272244         o = p->n_op;
 273245         ty = optype(o);
     
 !
315287         else
 316288                 p2 = NIL;
 317289         
<>318 -# ifndef BUG4
  290+#ifdef PCC_DEBUG
319291         if (odebug) {
 320292                 printf("order(%p, ", p);
 321293                 prcook(cook);
 322294                 printf("), cookie ");
 323295                 prcook(cookie);
 324296                 printf(", rewrite %s\n", opst[m]);
 325297         }
<>326 -# endif
  298+#endif
327299         switch (m) {
 328300         default:
 329301                 nomat:
     
 !
350322                         }
 351323 
 352324         case UNARY MINUS:
<>353 -                order( p1, INBREG|INAREG|SOREG );
  325+                order( p1, INBREG|INAREG);
354326                 goto again;
 355327 
 356328         case NAME:
     
 !
394366                         nfree(p);
 395367                         return;
 396368                 }
<>397 -#ifdef R2REGS
 398 -                /* try to coax a tree into a doubly indexed OREG */
 399 -                p1 = p->n_left;
 400 -                if( p1->n_op == PLUS ) {
 401 -                        if( ISPTR(p1->n_left->n_type) &&
 402 -                            offset(p1->n_right, tlen(p)) >= 0 ) {
 403 -                                order( p1->n_left, INAREG|INTAREG );
 404 -                                goto again;
 405 -                                }
 406 -                        if( ISPTR(p1->n_right->n_type) &&
 407 -                            offset(p1->n_left, tlen(p)) >= 0 ) {
 408 -                                order( p1->n_right, INAREG|INTAREG );
 409 -                                goto again;
 410 -                                }
 411 -                        }
 412 -#endif
413369                 offstar( p->n_left );
<> 370+#if 0
  371+                canon(p);
  372+                if( canaddr(p) && cook != INTEMP )
  373+                        goto cleanup;
  374+#endif
414375                 goto again;
 415376 
 416377         case INCR/* INCR and DECR */
     
 !
447408                 canon(p);
 448409                 rallo( p, p->n_rall );
 449410 
<>450 -# ifndef BUG4
  411+#ifdef PCC_DEBUG
451412                 if( odebug ) fwalk( p, e2print, 0 );
<>452 -# endif
  413+#endif
453414 
 454415                 order( p2->n_left, INTBREG|INTAREG );
 455416                 order( p2, INTBREG|INTAREG );
     
 !
627588                 }
 628589         callflag = 0;
 629590         store(p);
<>630 -# ifndef NESTCALLS
  591+#ifdef NO_NESTCALLS
631592         if( callflag ){ /* prevent two calls from being active at once  */
 632593                 SETSTO(p,INTEMP);
 633594                 store(p); /* do again to preserve bottom up nature....  */
     
 !
690651         }
 691652 }
 692653 
<>693 -# ifndef BUG4
  654+#ifdef PCC_DEBUG
694655 int
 695656 e2print(NODE *p, int down, int *a, int *b)
 696657 {
     
 !
742703         printf( ", SU= %d\n", p->n_su );
 743704         return 0;
 744705 }
<>745 -# endif
  706+#endif
<_746707 
 747708 #ifndef FIELDOPS
 748709 /*
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-11-01 13:35 +0100