Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.59
 
1.60
 
MAIN:ragge:20030730084730
 
trees.c
_>14681468 
 14691469         lab = -1;
 14701470         switch (o = p->n_op) {
<>1471 -        case ULE:
 1472 -        case ULT:
 1473 -        case UGE:
 1474 -        case UGT:
14751471         case EQ:
 14761472         case NE:
<>1477 -        case LE:
 1478 -        case LT:
 1479 -        case GE:
 1480 -        case GT:
14811473                 /*
<>1482 -                 * Remove redundant logop nodes.
  1474+                 * Remove redundant EQ/NE nodes.
14831475                  */
<>1484 -                while (clogop(o = p->n_left->n_op) &&
  1476+                while (((o = p->n_left->n_op) == EQ || o == NE) &&
14851477                     p->n_right->n_op == ICON) {
<>1486 -                        if (o == ANDAND || o == OROR || o == NOT)
 1487 -                                break;
  1478+                        o = p->n_op;
  1479+                        q = p->n_left;
14881480                         if (p->n_right->n_lval == 0) {
<>1489 -                                o = p->n_op;
 1490 -                                q = p->n_left;
14911481                                 nfree(p->n_right);
 14921482                                 *p = *q;
 14931483                                 nfree(q);
 14941484                                 if (o != NE)
 14951485                                         p->n_op = negrel[p->n_op - EQ];
<> 1486+                        } else if (p->n_right->n_lval == 1) {
  1487+                                nfree(p->n_right);
  1488+                                *p = *q;
  1489+                                nfree(q);
  1490+                                if (o != EQ)
  1491+                                        p->n_op = negrel[p->n_op - EQ];
14961492                         } else
 14971493                                 break;
 14981494                         
 14991495                 }
<>1500 -                if (true < 0) {
  1496+                /* FALLTHROUGH */
  1497+        case LE:
  1498+        case LT:
  1499+        case GE:
  1500+        case GT:
  1501+calc:           if (true < 0) {
15011502                         p->n_op = negrel[p->n_op - EQ];
 15021503                         true = false;
 15031504                         false = -1;
     
 !
15141515                         branch(false);
 15151516                 break;
 15161517 
<> 1518+        case ULE:
  1519+        case UGT:
  1520+                /* Convert to friendlier ops */
  1521+                if (p->n_right->n_op == ICON && p->n_right->n_lval == 0)
  1522+                        p->n_op = o == ULE ? EQ : NE;
  1523+                goto calc;
  1524+
  1525+        case UGE:
  1526+        case ULT:
  1527+                /* Already true/false by definition */
  1528+                if (p->n_right->n_op == ICON && p->n_right->n_lval == 0) {
  1529+                        if (true < 0) {
  1530+                                o = o == ULT ? UGE : ULT;
  1531+                                true = false;
  1532+                        }
  1533+                        rmcops(p->n_left);
  1534+                        ecode(p->n_left);
  1535+                        rmcops(p->n_right);
  1536+                        ecode(p->n_right);
  1537+                        nfree(p);
  1538+                        if (o == UGE) /* true */
  1539+                                branch(true);
  1540+                        break;
  1541+                }
  1542+                goto calc;
  1543+
<_15171544         case ANDAND:
 15181545                 lab = false<0 ? getlab() : false ;
 15191546                 andorbr(p->n_left, -1, lab);
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 02:14 +0100