Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.22
 
1.23
 
MAIN:ragge:20110716203413
 
local.c
_>9090                 break;
 9191 
 9292         case PCONV:
<>93 -                /* do pointer conversions for char and longs */
  93+                /* do pointer conversions */
  94+                /* XXX fix propagation down of changed types */
9495 
 9596                 /* if left is SCONV, cannot remove */
 9697                 if (p->n_left->n_op == SCONV)
     
 !
100101                 if (ml < INT && p->n_left->n_op != ICON)
 101102                         break;
 102103 
<>103 -                /*
 104 -                 * pointers all have the same representation;
 105 -                 * the type is inherited
 106 -                 */
 107 -
 108 -                p->n_left->n_type = p->n_type;
 109 -                p->n_left->n_df = p->n_df;
 110 -                p->n_left->n_ap = p->n_ap;
 111 -                r = p->n_left;
 112 -                nfree(p);
 113 -                p = r;
  104+                if (coptype(p->n_left->n_op) == LTYPE) {
  105+                        /*
  106+                         * pointers all have the same representation;
  107+                         * the type is inherited
  108+                         */
  109+                        p->n_left->n_type = p->n_type;
  110+                        p->n_left->n_df = p->n_df;
  111+                        p->n_left->n_ap = p->n_ap;
  112+                        r = p->n_left;
  113+                        nfree(p);
  114+                        p = r;
  115+                }
114116                 break;
 115117 
 116118         case RS:
     
 !
260262         return(1);      /* all are now */
 261263 }
 262264 
<> 265+/*
  266+ * Allocate off bits on the stack.  p is a tree that when evaluated
  267+ * is the multiply count for off, t is a storeable node where to write
  268+ * the allocated address.
  269+ */
263270 void
 264271 spalloc(NODE *t, NODE *p, OFFSZ off)
 265272 {
<>266 -        cerror("spalloc");
  273+        NODE *sp;
  274+
  275+        p = buildtree(MUL, p, bcon(off/SZCHAR)); /* XXX word alignment? */
  276+
  277+        /* sub the size from sp */
  278+        sp = block(REG, NIL, NIL, p->n_type, 0, 0);
  279+        sp->n_lval = 0;
  280+        sp->n_rval = STKREG;
  281+        ecomp(buildtree(MINUSEQ, sp, p));
  282+
  283+        /* save the address of sp */
  284+        sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_ap);
  285+        sp->n_lval = 0;
  286+        sp->n_rval = STKREG;
  287+        t->n_type = sp->n_type;
  288+        ecomp(buildtree(ASSIGN, t, sp)); /* Emit! */
  289+
<_267290 }
 268291 
 269292 char *
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 23:46 +0200