Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.78
 
1.79
 
MAIN:ragge:20040429202424
 
reader.c
_>136136 
 137137         /* generate code for the tree p */
 138138 #ifdef PCC_DEBUG
<>139 -        fprintf(stderr, "Entering pass2\n");
140139         walkf(p, cktree);
<>141 -        if (e2debug)
  140+        if (e2debug) {
  141+                fprintf(stderr, "Entering pass2\n");
142142                 fwalk(p, e2print, 0);
<> 143+        }
143144 #endif
 144145 
 145146 # ifdef MYREADER
     
 !
664665 
 665666 /*
 666667  * Rewrite node after instruction emit.
<>667 - * This is not strictly necessary anymore, but prettier if done :-)
668668  */
 669669 static void
 670670 rewrite(NODE *p, int rewrite)
 671671 {
<> 672+        NODE *l, *r;
  673+        int o;
  674+
672675         if (p->n_su == -1)
 673676                 comperr("rewrite");
 674677 
<>675 -        if (optype(p->n_op) != LTYPE)
 676 -                tfree(p->n_left);
 677 -        if (optype(p->n_op) == BITYPE)
 678 -                tfree(p->n_right);
  678+        l = p->n_left;
  679+        r = p->n_right;
  680+        o = p->n_op;
679681         p->n_op = REG;
<>680 -        p->n_rval = p->n_rall;
681682         p->n_lval = 0;
<>682 -        if (rewrite & RESC2)
 683 -                p->n_rval += szty(p->n_type);
  683+        if (rewrite & RLEFT) {
  684+#ifdef PCC_DEBUG
  685+                if (l->n_op != REG)
  686+                        comperr("rewrite left");
  687+#endif
  688+                p->n_rval = l->n_rval;
  689+        } else if (rewrite & RRIGHT) {
  690+#ifdef PCC_DEBUG
  691+                if (r->n_op != REG)
  692+                        comperr("rewrite right");
  693+#endif
  694+                p->n_rval = r->n_rval;
  695+        } else if (rewrite & RESC1)
  696+                p->n_rval = p->n_rall;
  697+        else if (rewrite & RESC2)
  698+                p->n_rval = p->n_rall + szty(p->n_type);
684699         else if (rewrite & RESC3)
<>685 -                p->n_rval += 2*szty(p->n_type);
  700+                p->n_rval = p->n_rall + 2*szty(p->n_type);
  701+        if (optype(o) != LTYPE)
  702+                tfree(l);
  703+        if (optype(o) == BITYPE)
  704+                tfree(r);
<_686705 }
 687706 
 688707 void
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-08-31 06:16 +0200