Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.336
 
1.337
 
MAIN:ragge:20140816134022
 
trees.c
_>8383 static int has_se(NODE *p);
 8484 static struct symtab *findmember(struct symtab *, char *);
 8585 int inftn; /* currently between epilog/prolog */
<> 86+NODE *cstknode(TWORD t, union dimfun *df, struct attr *ap);
8687 
 8788 static char *tnames[] = {
 8889         "undef",
     
 !
350351                 if (has_se(l)) {
 351352                         ll = l->n_left;
 352353 
<>353 -                        q = tempnode(0, ll->n_type, ll->n_df, ll->n_ap);
  354+                        q = cstknode(ll->n_type, ll->n_df, ll->n_ap);
354355                         l->n_left = ccopy(q);
 355356                         q = buildtree(ASSIGN, q, ll);
 356357                 } else
     
 !
377378                 if (has_se(l)) {
 378379                         ll = l->n_left;
 379380 
<>380 -                        q = tempnode(0, ll->n_type, ll->n_df, ll->n_ap);
  381+                        q = cstknode(ll->n_type, ll->n_df, ll->n_ap);
381382                         l->n_left = ccopy(q);
 382383                         q = buildtree(ASSIGN, q, ll);
 383384                 } else
     
 !
660661 {
 661662         NODE *t, *r;
 662663                 
<>663 -        t = tempnode(0, p1->n_type, p1->n_df, p1->n_ap);
  664+        t = cstknode(p1->n_type, p1->n_df, p1->n_ap);
664665         r = buildtree(ASSIGN, ccopy(t), ccopy(p1));
 665666         r = buildtree(COMOP, r, buildtree(op, p1, eve(p2)));
 666667         return buildtree(COMOP, r, t);
     
 !
21932194 }
 21942195 
 21952196 /*
<> 2197+ * Create a node for either TEMP or on-stack storage.
  2198+ */
  2199+NODE *
  2200+cstknode(TWORD t, union dimfun *df, struct attr *ap)
  2201+{
  2202+        struct symtab *sp;
  2203+
  2204+        /* create a symtab entry suitable for this type */
  2205+        sp = getsymtab("0hej", STEMP);
  2206+        sp->stype = t;
  2207+        sp->sdf = df;
  2208+        sp->sap = ap;
  2209+        sp->sclass = AUTO;
  2210+        sp->soffset = NOOFFSET;
  2211+        oalloc(sp, &autooff);
  2212+        return nametree(sp);
  2213+
  2214+}
  2215+
  2216+/*
21962217  * Massage the output trees to remove C-specific nodes:
 21972218  *      COMOPs are split into separate statements.
 21982219  *      QUEST/COLON are rewritten to branches.
     
 !
22352256                 q = p->n_right->n_left;
 22362257                 comops(q);
 22372258                 if (type != VOID) {
<>2238 -                        tval = tempnode(0, q->n_type, q->n_df, q->n_ap);
  2259+                        tval = cstknode(q->n_type, q->n_df, q->n_ap);
22392260                         q = buildtree(ASSIGN, ccopy(tval), q);
 22402261                 }
 22412262                 rmcops(q);
     
 !
22842305                 *r = *p;
 22852306                 andorbr(r, -1, lbl = getlab());
 22862307 
<>2287 -                tval = tempnode(0, p->n_type, p->n_df, p->n_ap);
  2308+                tval = cstknode(p->n_type, p->n_df, p->n_ap);
22882309 
 22892310                 ecode(buildtree(ASSIGN, ccopy(tval), bcon(1)));
 22902311                 branch(lbl2 = getlab());
     
 !
28582879 
 28592880         if (cdope(o) & CALLFLG) {
 28602881                 if (split) {
<>2861 -                        q = tempnode(0, p->n_type, p->n_df, p->n_ap);
  2882+                        q = cstknode(p->n_type, p->n_df, p->n_ap);
<_28622883                         r = ccopy(q);
 28632884                         q = block(ASSIGN, q, p, p->n_type, p->n_df, p->n_ap);
 28642885                         ecode(q);
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 18:14 +0100