Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.49
 
1.50
 
MAIN:ragge:20030901120803
 
reader.c
_>326326         switch (m = p->n_op) {
 327327 
 328328         case PLUS:
<> 329+        case MINUS:
329330                 {
 330331                         struct optab *q;
 331332                         int rv;
 332333 
 333334                         /*
 334335                          * Be sure that both sides are addressable.
 335336                          */
<> 337+//printf("newstyle node %p\n", p);
336338                         if (!canaddr(p->n_left))
 337339                                 order(p->n_left, INTAREG|INTBREG);
<> 340+//printf("newstyle addrl %p\n", p);
338341                         if (!canaddr(p->n_right))
 339342                                 order(p->n_right, INTAREG|INTBREG);
<> 343+//printf("newstyle addrr %p\n", p);
340344 
 341345                         /*
 342346                          *
 343347                          */
 344348 #define LTMP    1
 345349 #define RTMP    2
 346350                         rv = findops(p);
<>347 -                        if (rv < 0)
  351+                        if (rv < 0) {
  352+                                if (setnbin(p))
  353+                                        goto again;
348354                                 goto nomat;
<> 355+                        }
349356                         if (rv & LTMP)
 350357                                 order(p->n_left, INTAREG|INTBREG);
<> 358+//printf("newstyle ltmp %p\n", p);
351359                         if (rv & RTMP)
 352360                                 order(p->n_right, INTAREG|INTBREG);
<> 361+//printf("newstyle rtmp %p\n", p);
353362                 
 354363 
 355364                         q = &table[rv >> 2];
 356365                         if (!allo(p, q))
 357366                                 cerror("allo failed");
 358367                         expand(p, INTAREG|INTBREG, q->cstring);
 359368                         reclaim(p, q->rewrite, INTAREG|INTBREG);
<> 369+//printf("newstyle ute %p\n", p);
360370                 }
 361371                 goto cleanup;
 362372 
     
 !
502512                 if (cook & FOREFF) {
 503513                         nfree(p->n_right);
 504514                         p->n_right = p1;
<>505 -                        p->n_op = ASSIGN;
506515                         p1->n_op = (p->n_op == INCR) ? PLUS: MINUS;
<> 516+                        p->n_op = ASSIGN;
507517                 } else {
 508518                         p2 = talloc();
 509519                         p2->n_rall = NOPREF;
     
 !
514524                         p2->n_right = p1;
 515525                         p1->n_op = (p->n_op == INCR) ? PLUS: MINUS;
 516526                         p->n_op = (p->n_op == INCR) ? MINUS : PLUS;
<> 527+                        p->n_left = p2;
517528                 }
 518529                 goto again;
 519530 
     
 !
551562                 if( setbin( p ) ) goto again;
 552563                 /* try to replace binary ops by =ops */
 553564                 switch(o){
<>554 -
  565+#if 0
555566                 case PLUS:
 556567                 case MINUS:
<> 568+#endif
557569                 case MUL:
 558570                 case DIV:
 559571                 case MOD:
     
 !
11181130         int *ixp;
 11191131         int rv = -1, mtchno = 10;
 11201132 
<> 1133+if (f2debug) printf("findops tree:\n");
  1134+if (f2debug) fwalk(p, e2print, 0);
  1135+
11211136         ixp = qtable[p->n_op];
 11221137         for (i = 0; ixp[i] != 0; i++) {
 11231138                 q = &table[ixp[i]];
     
 !
11791194                          * a temporary register, and the current op matches,
 11801195                          * be happy.
 11811196                          */
<>1182 -                        if (q->needs & NDLEFT) {
  1197+                        if ((q->needs & NDRIGHT) && istnode(r)) {
  1198+                                /* put left in temp, add to right */
11831199                                 if (4 < mtchno) {
 11841200                                         mtchno = 4;
 11851201                                         rv = (ixp[i] << 2) | LTMP;
 11861202                                 }
<> 1203+                        } else if (q->needs & NDLEFT) {
  1204+                                if (4 < mtchno) {
  1205+                                        mtchno = 4;
  1206+                                        rv = (ixp[i] << 2) | LTMP;
  1207+                                }
11871208                                 continue; /* Can't do anything else */
 11881209                         } else if (is3) {
 11891210                                 if (5 < mtchno) {
     
 !
12001221                          * a temporary register, and the current op matches,
 12011222                          * be happy.
 12021223                          */
<>1203 -                        if (q->needs & NDRIGHT) {
  1224+                        if ((q->needs & NDLEFT) && istnode(l)) {
  1225+                                /* put right in temp, add to left */
12041226                                 if (4 < mtchno) {
 12051227                                         mtchno = 4;
 12061228                                         rv = (ixp[i] << 2) | RTMP;
 12071229                                 }
<> 1230+                        } else if (q->needs & NDRIGHT) {
  1231+                                if (4 < mtchno) {
  1232+                                        mtchno = 4;
  1233+                                        rv = (ixp[i] << 2) | RTMP;
  1234+                                }
12081235                                 continue; /* Can't do anything */
 12091236                         } else if (is3) {
 12101237                                 if (5 < mtchno) {
     
 !
12321259                         }
 12331260                 }
 12341261         }
<> 1262+if (f2debug) { if (rv == -1) printf("findops failed\n"); else printf("findops entry %d, %s %s\n", rv >> 2, rv & RTMP ? "RTMP" : "", rv & LTMP ? "LTMP" : ""); }
<_12351263         return rv;
 12361264 }
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