Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.122
 
1.123
 
MAIN:ragge:20050402075617
 
reader.c
_>6060  * POSSIBILITY OF SUCH DAMAGE.
 6161  */
 6262 
<> 63+/*
  64+ * processing order for nodes:
  65+ * - myreader()
  66+ * - mkhardops()
  67+ * - gencall()
  68+ * - delay()
  69+ * - canon()
  70+ * - deluseless()
  71+ * - saves trees here if optimizing
  72+ */
  73+
6374 # include "pass2.h"
 6475 
 6576 #include <string.h>
     
 !
7485 int ftnno;
 7586 int thisline;
 7687 int fregs;
<> 88+int p2autooff, p2maxautooff;
7789 
 7890 NODE *nodepole;
 7991 int saving;
     
 !
155167         tfree(p);
 156168 }
 157169 
<> 170+#ifdef NEW_READER
  171+
  172+#else
158173 /* look for delayable ++ and -- operators */
 159174 void
 160175 delay(NODE *p)
     
 !
199214         if (ty != LTYPE)
 200215                 delay(p->n_left);
 201216 }
<> 217+#endif
202218 
 203219 /*
 204220  * Check if a node has side effects.
     
 !
268284         return NULL;
 269285 }
 270286 
<> 287+#ifdef NEW_READER
  288+/*
  289+ * Receives interpass structs from pass1.
  290+ */
  291+void
  292+pass2_compile(struct interpass *ip)
  293+{
  294+
  295+        if (ip->type == IP_NODE) {
  296+                myreader(ip->ip_node); /* local massage of input */
  297+                mkhardops(ip->ip_node);
  298+                gencall(ip->ip_node, NIL);
  299+                while ((p = delay(ip->ip_node)) != NULL)
  300+                        pass2_compile(...);
  301+                canon(ip->ip_node);
  302+                if ((ip->ip_node = deluseless(ip->ip_node)) == NULL)
  303+                        return; /* nothing to do */
  304+        }
  305+        if (Oflag)
  306+                return saveip(ip);
  307+
  308+        /*
  309+         * ends up here only if not optimizing.
  310+         */
  311+}
  312+#else
  313+
271314 #ifdef TAILCALL
 272315 int earlylab, retlab2;
 273316 char *cftname;
     
 !
367410         case IP_EPILOG:
 368411                 eoftn((struct interpass_prolog *)ip);
 369412                 tmpsave = NULL/* Always forget old nodes */
<> 413+                p2maxautooff = p2autooff = AUTOINIT;
370414                 break;
<> 415+        case IP_STKOFF:
  416+                p2autooff = ip->ip_off;
  417+                if (p2autooff > p2maxautooff)
  418+                        p2maxautooff = p2autooff;
  419+                break;
371420         case IP_DEFLAB:
 372421                 deflab(ip->ip_lbl);
 373422                 break;
     
 !
379428         }
 380429 }
 381430 
<> 431+#endif
  432+
382433 /*
 383434  * generate the code for p;
 384435  * store may call codgen recursively
     
 !
16101661         int t;
 16111662 
 16121663         if (k > 1)
<>1613 -                SETOFF(autooff, ALDOUBLE);
  1664+                SETOFF(p2autooff, ALDOUBLE);
16141665 
<>1615 -        t = autooff;
 1616 -        autooff += k*SZINT;
 1617 -        if (autooff > maxautooff)
 1618 -                maxautooff = autooff;
  1666+        t = p2autooff;
  1667+        p2autooff += k*SZINT;
  1668+        if (p2autooff > p2maxautooff)
  1669+                p2maxautooff = p2autooff;
16191670         return (t);
 16201671 
 16211672 #else
<>1622 -        autooff += k*SZINT;
  1673+        p2autooff += k*SZINT;
16231674         if (k > 1)
<>1624 -                SETOFF(autooff, ALDOUBLE);
  1675+                SETOFF(p2autooff, ALDOUBLE);
16251676 
<>1626 -        if (autooff > maxautooff)
 1627 -                maxautooff = autooff;
 1628 -        return( -autooff );
  1677+        if (p2autooff > p2maxautooff)
  1678+                p2maxautooff = p2autooff;
  1679+        return( -p2autooff );
<_16291680 #endif
 16301681         }
 16311682 
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-18 15:45 +0200