Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.40
 
1.41
 
MAIN:ragge:20030703135351
 
trees.c
_>140140                 }
 141141 
 142142         else if( o==QUEST && l->n_op==ICON ) {
<>143 -                l->n_op = FREE;
 144 -                r->n_op = FREE;
 145 -                if( l->n_lval ){
 146 -                        tfree( r->n_right );
 147 -                        return( r->n_left );
 148 -                        }
 149 -                else {
 150 -                        tfree( r->n_left );
 151 -                        return( r->n_right );
 152 -                        }
  143+                CONSZ c = l->n_lval;
  144+                nfree(l);
  145+                if (c) {
  146+                        tfree(r->n_right);
  147+                        l = r->n_left;
  148+                        nfree(r);
  149+                        return(l);
  150+                } else {
  151+                        tfree(r->n_left);
  152+                        l = r->n_right;
  153+                        nfree(r);
  154+                        return(l);
153155                 }
<> 156+        }
154157 
 155158         else if( (o==ANDAND || o==OROR) && (l->n_op==ICON||r->n_op==ICON) ) goto ccwarn;
 156159 
     
 !
171174                         if( l->n_type == ENUMTY && r->n_type == ENUMTY ){
 172175                                 p = block(o, l, r, INT, 0, MKSUE(INT));
 173176                                 chkpun( p );
<>174 -                                p->n_op = FREE;
 175 -                                }
  177+                                nfree(p);
  178+                        }
176179 
 177180                 case ANDAND:
 178181                 case OROR:
     
 !
191194                 case LS:
 192195                 case RS:
 193196                         if( conval( l, o, r ) ) {
<>194 -                                r->n_op = FREE;
  197+                                nfree(r);
195198                                 return(l);
 196199                                 }
 197200                         break;
     
 !
245248                                 l->n_op = DCON;
 246249                                 l->n_type = DOUBLE;
 247250                                 l->n_sue = MKSUE(DOUBLE);
<>248 -                                r->n_op = FREE;
  251+                                nfree(r);
249252                                 return (l);
 250253                         }
 251254                 }
     
 !
393396                         break;
 394397 
 395398                 case UNARY MUL:
<>396 -                        if( l->n_op == UNARY AND ){
 397 -                                p->n_op = l->n_op = FREE;
  399+                        if (l->n_op == UNARY AND) {
  400+                                nfree(p);
398401                                 p = l->n_left;
<>399 -                                }
  402+                                nfree(l);
  403+                        }
400404                         if( !ISPTR(l->n_type))uerror("illegal indirection");
 401405                         p->n_type = DECREF(l->n_type);
 402406                         p->n_df = l->n_df;
     
 !
407411                         switch( l->n_op ){
 408412 
 409413                         case UNARY MUL:
<>410 -                                p->n_op = l->n_op = FREE;
  414+                                nfree(p);
411415                                 p = l->n_left;
<> 416+                                nfree(l);
412417                         case NAME:
 413418                                 p->n_type = INCREF( l->n_type );
 414419                                 p->n_df = l->n_df;
 415420                                 p->n_sue = l->n_sue;
 416421                                 break;
 417422 
 418423                         case COMOP:
<> 424+                                nfree(p);
419425                                 lr = buildtree( UNARY AND, l->n_right, NIL );
<>420 -                                p->n_op = l->n_op = FREE;
421426                                 p = buildtree( COMOP, l->n_left, lr );
<> 427+                                nfree(l);
422428                                 break;
 423429 
 424430                         case QUEST:
 425431                                 lr = buildtree( UNARY AND, l->n_right->n_right, NIL );
 426432                                 ll = buildtree( UNARY AND, l->n_right->n_left, NIL );
<>427 -                                p->n_op = l->n_op = l->n_right->n_op = FREE;
  433+                                nfree(p); nfree(l->n_right);
428434                                 p = buildtree( QUEST, l->n_left, buildtree( COLON, ll, lr ) );
<> 435+                                nfree(l);
429436                                 break;
 430437 
 431438 # ifdef ADDROREG        /* XXX 4.4  addroreg */
     
 !
437444                                  * back to PLUS/MINUS REG ICON
 438445                                  * according to local conventions
 439446                                  */
<>440 -                                p->n_op = FREE;
  447+                                nfree(p);
441448                                 p = addroreg( l );
 442449                                 break;
 443450 
     
 !
486493                                 l = block(STASG, l, r, t, d, sue);
 487494 
 488495                                 if( o == RETURN ){
<>489 -                                        p->n_op = FREE;
  496+                                        nfree(p);
490497                                         p = l;
 491498                                         break;
 492499                                 }
     
 !
806813 NODE *
 807814 stref(NODE *p)
 808815 {
<> 816+        NODE *r;
809817         struct suedef *sue;
 810818         union dimfun *d;
 811819         TWORD t;
     
 !
817825         /* this is also used to reference automatic variables */
 818826 
 819827         q = p->n_right->n_sp;
<>820 -        p->n_right->n_op = FREE;
 821 -        p->n_op = FREE;
 822 -        p = pconvert(p->n_left);
  828+        nfree(p->n_right);
  829+        r = p->n_left;
  830+        nfree(p);
  831+        p = pconvert(r);
<_823832 
 824833         /* make p look like ptr to x */
 825834 
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-22 20:31 +0100