Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.7
 
1.8
 
MAIN:ragge:20020926204151
 
reader.c
_>1212 int Oflag = 0;
 1313 #endif
 1414 extern int Wflag;
<>15 -int edebug = 0;
1615 int xdebug = 0;
 1716 int udebug = 0;
 1817 int vdebug = 0;
     
 !
2726 OFFSZ baseoff = 0;
 2827 OFFSZ maxtemp = 0;
 2928 
<> 29+static int e2print(NODE *p, int down, int *a, int *b);
  30+
3031 void
 3132 p2compile(NODE *p)
 3233 {
     
 !
3536         tmpoff = baseoff/* expression at top level reuses temps */
 3637         /* generate code for the tree p */
 3738 # ifndef BUG4
<>38 -        if( edebug ) fwalk( p, eprint, 0 );
  39+        if (e2debug) fwalk( p, e2print, 0 );
3940 # endif
 4041 
 4142 # ifdef MYREADER
     
 !
199200 codgen(NODE *p, int cookie)
 200201 {
 201202 
<>202 -        for(;;){
  203+        for (;;) {
203204                 canon(p);  /* creats OREG from * if possible and does sucomp */
 204205                 stotree = NIL;
 205206 # ifndef BUG4
<>206 -                if( edebug ){
 207 -                        printf( "store called on:\n" );
 208 -                        fwalk( p, eprint, 0 );
 209 -                        }
  207+                if (e2debug) {
  208+                        printf("store called on:\n");
  209+                        fwalk(p, e2print, 0);
  210+                }
210211 # endif
 211212                 store(p);
 212213                 if( stotree==NIL ) break;
     
 !
290291         cookie = cook;
 291292         rcount();
 292293         canon(p);
<>293 -        rallo( p, p->in.rall );
  294+        rallo(p, p->in.rall);
294295         goto first;
<>295 -        /* by this time, p should be able to be generated without stores;
 296 -           the only question is how */
297296 
<> 297+
  298+        /*
  299+         * by this time, p should be able to be generated without stores;
  300+         * the only question is how
  301+         */
298302         again:
 299303 
<>300 -        if ( p->in.op == FREE )
  304+        if (p->in.op == FREE)
301305                 return;         /* whole tree was done */
 302306         cookie = cook;
 303307         rcount();
 304308         canon(p);
<>305 -        rallo( p, p->in.rall );
 306 -        /* if any rewriting and canonicalization has put
  309+        rallo(p, p->in.rall);
  310+        /*
  311+         * if any rewriting and canonicalization has put
307312          * the tree (p) into a shape that cook is happy
 308313          * with (exclusive of FOREFF, FORREW, and INTEMP)
 309314          * then we are done.
 310315          * this allows us to call order with shapes in
 311316          * addition to cookies and stop short if possible.
 312317          */
<>313 -        if( tshape(p, cook &(~(FOREFF|FORREW|INTEMP))) )return;
  318+        if (tshape(p, cook &(~(FOREFF|FORREW|INTEMP))))
  319+                return;
314320 
 315321         first:
 316322 # ifndef BUG4
<>317 -        if( odebug ){
 318 -                printf( "order( %p, ", p );
 319 -                prcook( cookie );
 320 -                printf( " )\n" );
 321 -                fwalk( p, eprint, 0 );
 322 -                }
  323+        if (odebug) {
  324+                printf("order(%p, ", p);
  325+                prcook(cookie);
  326+                printf(")\n");
  327+                fwalk(p, e2print, 0);
  328+        }
323329 # endif
 324330 
 325331         o = p->in.op;
     
 !
329335 
 330336         /* look for ops */
 331337 
<>332 -        switch( m = p->in.op ){
  338+        switch (m = p->in.op) {
333339 
 334340         default:
 335341                 /* look for op in table */
<>336 -                for(;;){
 337 -                        if( (m = match( p, cookie ) ) == MDONE ) goto cleanup;
 338 -                        else if( m == MNOPE ){
 339 -                                if( !(cookie = nextcook( p, cookie ) ) ) goto nomat;
  342+                for (;;) {
  343+                        if ((m = match(p, cookie)) == MDONE)
  344+                                goto cleanup;
  345+                        else if (m == MNOPE) {
  346+                                if (!(cookie = nextcook(p, cookie)))
  347+                                        goto nomat;
340348                                 continue;
<>341 -                                }
 342 -                        else break;
 343 -                        }
  349+                        } else
  350+                                break;
  351+                }
344352                 break;
 345353 
 346354         case COMOP:
     
 !
359367                 /* don't even go near the table... */
 360368                 ;
 361369 
<>362 -                }
 363 -        /* get here to do rewriting if no match or
 364 -           fall through from above for hard ops */
  370+        }
  371+        /*
  372+         * get here to do rewriting if no match or
  373+         * fall through from above for hard ops
  374+         */
365375 
 366376         p1 = p->in.left;
<>367 -        if( ty == BITYPE ) p2 = p->in.right;
 368 -        else p2 = NIL;
  377+        if (ty == BITYPE)
  378+                p2 = p->in.right;
  379+        else
  380+                p2 = NIL;
369381         
 370382 # ifndef BUG4
<>371 -        if( odebug ){
 372 -                printf( "order( %p, ", p );
 373 -                prcook( cook );
 374 -                printf( " ), cookie " );
 375 -                prcook( cookie );
 376 -                printf( ", rewrite %s\n", opst[m] );
 377 -                }
  383+        if (odebug) {
  384+                printf("order(%p, ", p);
  385+                prcook(cook);
  386+                printf("), cookie ");
  387+                prcook(cookie);
  388+                printf(", rewrite %s\n", opst[m]);
  389+        }
378390 # endif
<>379 -        switch( m ){
  391+        switch (m) {
380392         default:
 381393                 nomat:
 382394                 cerror( "no table entry for op %s", opst[p->in.op] );
     
 !
536548                 rallo( p, p->in.rall );
 537549 
 538550 # ifndef BUG4
<>539 -                if( odebug ) fwalk( p, eprint, 0 );
  551+                if( odebug ) fwalk( p, e2print, 0 );
540552 # endif
 541553 
 542554                 order( p2->in.left, INTBREG|INTAREG );
 543555                 order( p2, INTBREG|INTAREG );
 544556                 goto again;
 545557 
 546558         case ASSIGN:
<>547 -                if( setasg( p ) ) goto again;
  559+                if (setasg(p))
  560+                        goto again;
548561                 goto nomat;
 549562 
 550563 
     
 !
586599         if( (m=match(p,cook) ) == MDONE ) return;
 587600 
 588601         /* we are in bad shape, try one last chance */
<>589 -        if( lastchance( p, cook ) ) goto again;
  602+        if (lastchance(p, cook))
  603+                goto again;
590604 
 591605         goto nomat;
<>592 -        }
  606+}
593607 
 594608 int callflag;
 595609 int fregs;
     
 !
890904 
 891905 # ifndef BUG4
 892906 int
<>893 -eprint(NODE *p, int down, int *a, int *b)
  907+e2print(NODE *p, int down, int *a, int *b)
<_894908 {
 895909 
 896910         *a = *b = down+1;
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-07-10 10:31 +0200