Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.90
 
1.91
 
MAIN:ragge:20030907141335
 
trees.c
_>14841484 
 14851485 /*
 14861486  * Do sizeof on p.
<>1487 - * XXX - add runtime evaluation sizeof.
14881487  */
 14891488 NODE *
 14901489 doszof(NODE *p)
 14911490 {
<>1492 -        int i;
  1491+        union dimfun *df;
  1492+        TWORD ty;
  1493+        NODE *rv;
14931494 
<>1494 -        i = tsize( p->n_type, p->n_df, p->n_sue )/SZCHAR;
  1495+        /*
  1496+         * Arrays may be dynamic, may need to make computations.
  1497+         */
14951498 
<> 1499+        rv = bcon(1);
  1500+        df = p->n_df;
  1501+        ty = p->n_type;
  1502+        while (ISARY(ty)) {
  1503+                rv = buildtree(MUL, rv, df->ddim >= 0 ? bcon(df->ddim) :
  1504+                    tempnode(-df->ddim, INT, 0, MKSUE(INT)));
  1505+                df++;
  1506+                ty = DECREF(ty);
  1507+        }
  1508+        rv = buildtree(MUL, rv, bcon(tsize(ty, p->n_df, p->n_sue)/SZCHAR));
14961509         tfree(p);
<>1497 -        if (i <= 0)
 1498 -                werror( "sizeof returns 0" );
 1499 -        return (bcon(i));
  1510+        return rv;
<_15001511 }
 15011512 
 15021513 #ifdef PCC_DEBUG
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-09-03 06:50 +0200