Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.35
 
1.36
 
MAIN:ragge:20030622112450
 
trees.c
_>1111 void chkpun(NODE *p);
 1212 int opact(NODE *p);
 1313 int moditype(TWORD);
<>14 -static void to_pass2(NODE *p);
1514 
 1615 /* corrections when in violation of lint */
 1716 
     
 !
16421641         tfree(p);
 16431642         }
 16441643 
<>1645 -# ifdef STDPRTREE
  1644+#ifdef STDPRTREE
  1645+#if defined(MULTIPASS)
  1646+void    
  1647+p2tree(NODE *p)
  1648+{
  1649+        struct symtab *q;
  1650+        int ty;
16461651 
<> 1652+# ifdef MYP2TREE
  1653+        MYP2TREE(p);  /* local action can be taken here; then return... */
  1654+# endif
  1655+
  1656+        ty = optype(p->n_op);
  1657+
  1658+        p1print("%d\t", p->n_op);
  1659+
  1660+        if (ty == LTYPE) {
  1661+                p1print(CONFMT, p->n_lval);
  1662+                p1print("\t");
  1663+        }
  1664+        if (ty != BITYPE) {
  1665+                if (p->n_op == NAME || p->n_op == ICON)
  1666+                        p1print("0\t");
  1667+                else
  1668+                        p1print("%d\t", p->n_rval);
  1669+                }
  1670+
  1671+        printf("%o\t", p->n_type);
  1672+
  1673+        /* handle special cases */
  1674+
  1675+        switch (p->n_op) {
  1676+
  1677+        case NAME:
  1678+        case ICON:
  1679+                /* print external name */
  1680+                if (p->n_sp != NULL) {
  1681+                        if (p->n_sp->sflags & SLABEL ||
  1682+                            p->n_sp->sclass == ILABEL) {
  1683+                                p1print(LABFMT, p->n_sp->soffset);
  1684+                        } else
  1685+                                p1print("%s\n", exname(q->sname));
  1686+                } else
  1687+                        p1print("\n");
  1688+                break;
  1689+
  1690+        case STARG:
  1691+        case STASG:
  1692+        case STCALL:
  1693+        case UNARY STCALL:
  1694+                /* print out size */
  1695+                /* use lhs size, in order to avoid hassles
  1696+                 * with the structure `.' operator
  1697+                 */
  1698+
  1699+                /* note: p->left not a field... */
  1700+                printf(CONFMT, (CONSZ)tsize(STRTY, p->n_left->n_df,
  1701+                    p->n_left->n_sue));
  1702+                printf("\t%d\t\n", talign(STRTY, p->n_left->n_sue));
  1703+                break;
  1704+
  1705+        default:
  1706+                printf"\n" );
  1707+        }
  1708+
  1709+        if (ty != LTYPE)
  1710+                p2tree(p->n_left);
  1711+        if (ty == BITYPE)
  1712+                p2tree(p->n_right);
  1713+}
  1714+#else
16471715 void
 16481716 p2tree(NODE *p)
 16491717 {
     
 !
16941762         if( ty == BITYPE ) p2tree( p->n_right );
 16951763         }
 16961764 
<>1697 -# endif
  1765+#endif
  1766+#endif
16981767 
<>1699 -void
  1768+#if !defined(MULTIPASS)
  1769+static void
17001770 to_pass2(NODE *p)
 17011771 {
 17021772         if (isinlining)
 17031773                 inline_savenode(p);
 17041774         else
 17051775                 p2compile(p);
 17061776 }
<> 1777+#endif
17071778 
 17081779 void
<>1709 -ecode(NODE *p
  1780+ecode(NODE *p)  
17101781 {
 17111782         /* walk the tree and write out the nodes.. */
 17121783 
<>1713 -        if (nerrors)   
  1784+        if (nerrors)    
17141785                 return;
 17151786 #ifdef PCC_DEBUG
 17161787         if (xdebug) {
 17171788                 printf("Fulltree:\n");
 17181789                 fwalk(p, eprint, 0);
 17191790         }
 17201791 #endif
<>1721 -        p2tree(p);     
  1792+        p2tree(p);
  1793+#if !defined(MULTIPASS)
17221794         to_pass2(p);
<> 1795+#endif
<_17231796 }
 17241797 
 17251798 /*
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 14:59 +0100