Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.7
 
1.8
 
MAIN:ragge:20030703135351
 
optim.c
_>4646 optim(NODE *p)
 4747 {
 4848         int o, ty;
<>49 -        NODE *sp;
  49+        NODE *sp, *q;
5050         int i;
 5151         TWORD t;
 5252 
     
 !
8080                 p->n_left->n_type = p->n_type;
 8181                 p->n_left->n_df = p->n_df;
 8282                 p->n_left->n_sue = p->n_sue;
<>83 -                p->n_op = FREE;
 84 -                return( p->n_left );
  83+                q = p->n_left;
  84+                nfree(p);
  85+                return q;
8586 
 8687         case UNARY MUL:
 8788                 if( LO(p) != ICON ) break;
     
 !
117118                 if(o == PLUS && LO(p) == MINUS && RCON(p) && RCON(p->n_left) &&
 118119                    conval(p->n_right, MINUS, p->n_left->n_right)){
 119120                         zapleft:
<>120 -                        RO(p->n_left) = FREE;
 121 -                        LO(p) = FREE;
 122 -                        p->n_left = p->n_left->n_left;
  121+
  122+                        q = p->n_left->n_left;
  123+                        nfree(p->n_left->n_right);
  124+                        nfree(p->n_left);
  125+                        p->n_left = q;
123126                 }
 124127                 if( RCON(p) && LO(p)==o && RCON(p->n_left) &&
 125128                     conval( p->n_right, o, p->n_left->n_right ) ){
     
 !
128131                 else if( LCON(p) && RCON(p) &&
 129132                          conval( p->n_left, o, p->n_right ) ){
 130133                         zapright:
<>131 -                        RO(p) = FREE;
 132 -                        p->n_left = makety(p->n_left, p->n_type,
 133 -                            p->n_df, p->n_sue);
 134 -                        p->n_op = FREE;
 135 -                        return( clocal( p->n_left ) );
 136 -                        }
  134+                        nfree(p->n_right);
  135+                        q = makety(p->n_left, p->n_type, p->n_df, p->n_sue);
  136+                        nfree(p);
  137+                        return clocal(q);
  138+                }
137139                 /* FALL THROUGH */
 138140 
 139141         case ASG MUL:
     
 !
171173                                 if( asgop(o) )
 172174                                         p->n_op = ASSIGN;
 173175                                 else if( optype(LO(p)) == LTYPE ) {
<>174 -                                        p->n_op = FREE;
 175 -                                        LO(p) = FREE;
 176 -                                        p = p->n_right;
 177 -                                        }
 178 -                                else
  176+                                        q = p->n_right;
  177+                                        nfree(p);
  178+                                        nfree(p->n_left);
  179+                                        p = q;
  180+                                } else
179181                                         p->n_op = COMOP; /* side effects */
<>180 -                                }
 181 -                        else if( o == PLUS || o == MINUS ||
  182+                        } else if( o == PLUS || o == MINUS ||
182183                                  o == ASG PLUS || o == ASG MINUS ||
 183184                                  o == OR || o == ER ||
 184185                                  o == LS || o == RS )
 185186                                 goto zapright;
<>186 -                        }
  187+                }
187188                 if( o != LS && o != RS )
 188189                         break;
 189190                 /* FALL THROUGH */
     
 !
235236                                 if( asgop(o) )
 236237                                         p->n_op = ASSIGN;
 237238                                 else if( optype(LO(p)) == LTYPE ) {
<>238 -                                        p->n_op = FREE;
 239 -                                        LO(p) = FREE;
 240 -                                        p = p->n_right;
 241 -                                        }
 242 -                                else
  239+                                        q = p->n_right;
  240+                                        nfree(p);
  241+                                        nfree(p->n_left);
  242+                                        p = q;
  243+                                } else
243244                                         p->n_op = COMOP; /* side effects */
<>244 -                                }
 245 -                        else if ((i=ispow2(RV(p)))>=0 &&
  245+                        } else if ((i=ispow2(RV(p)))>=0 &&
246246                                  (ISUNSIGNED(p->n_left->n_type) ||
 247247                                   ISUNSIGNED(p->n_right->n_type)) ){
 248248                                 /* Unsigned mod by a power of two */
 249249                                 p->n_op = (asgop(o) ? ASG AND : AND);
 250250                                 RV(p)--;
<>251 -                                }
252251                         }
<> 252+                }
<_253253                 break;
 254254 
 255255         case EQ:
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-16 21:31 +0200