Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.45
 
1.46
 
MAIN:ragge:20030821173333
 
reader.c
_>6363 void optdump(struct interpass *ip);
 6464 void cvtemps(struct interpass *epil);
 6565 
<> 66+#define DELAYS 20
  67+NODE *deltrees[DELAYS];
  68+int deli;
6669 
 6770 #ifdef PCC_DEBUG
 6871 static void
     
 !
7881 static void
 7982 p2compile(NODE *p)
 8083 {
<> 84+        int i;
  85+
8186 #if !defined(MULTIPASS)
 8287         extern char *ftitle;
 8388 #endif
     
 !
96101         MYREADER(p);  /* do your own laundering of the input */
 97102 # endif
 98103         nrecur = 0;
<> 104+        deli = 0;
  105+        delay(p);
99106         codgen(p, FOREFF);
<> 107+        for (i = 0; i < deli; ++i)
  108+                codgen(deltrees[i], FOREFF);  /* do the rest */
100109         reclaim( p, RNULL, 0 );
 101110         allchk();
 102111 }
 103112 
<> 113+/* look for delayable ++ and -- operators */
  114+void
  115+delay(NODE *p)
  116+{
  117+        int ty = optype(p->n_op);
  118+
  119+        switch (p->n_op) {
  120+        case CALL:
  121+        case UNARY CALL:
  122+        case STCALL:
  123+        case UNARY STCALL:
  124+        case FORTCALL:
  125+        case UNARY FORTCALL:
  126+        case CBRANCH:
  127+                /* for the moment, don7t delay past a conditional context, or
  128+                 * inside of a call */
  129+                return;
  130+
  131+        case UNARY MUL:
  132+                /* if *p++, do not rewrite */
  133+                if( autoincr( p ) ) return;
  134+                break;
  135+
  136+        case INCR:
  137+        case DECR:
  138+                if( deltest( p ) ){
  139+                        if( deli < DELAYS ){
  140+                                register NODE *q;
  141+                                deltrees[deli++] = tcopy(p);
  142+                                q = p->n_left;
  143+                                p->n_right->n_op = FREE/* zap constant */
  144+                                *p = *q;
  145+                                q->n_op = FREE;
  146+                                return;
  147+                                }
  148+                        }
  149+
  150+                }
  151+
  152+        if (ty == BITYPE)
  153+                delay(p->n_right);
  154+        if (ty != LTYPE)
  155+                delay(p->n_left);
  156+}
  157+
<_104158 static void newblock(int myreg, int aoff);
 105159 static void epilogue(int regs, int autos, int retlab);
 106160 
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-02 23:32 +0200