Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.205
 
1.206
 
MAIN:ragge:20080904094133
 
trees.c
_>141141         } else if (o == NOT && l->n_op == FCON) {
 142142                 l = clocal(block(SCONV, l, NIL, INT, 0, MKSUE(INT)));
 143143         } else if( o == UMINUS && l->n_op == FCON ){
<>144 -                        l->n_dcon = -l->n_dcon;
  144+                        l->n_dcon = FLOAT_NEG(l->n_dcon);
145145                         return(l);
 146146 
 147147         } else if( o==QUEST && l->n_op==ICON ) {
     
 !
214214                 case MUL:
 215215                 case DIV:
 216216                         if (l->n_op == ICON)
<>217 -                                l->n_dcon = l->n_lval;
  217+                                l->n_dcon = FLOAT_CAST(l->n_lval, l->n_type);
218218                         if (r->n_op == ICON)
<>219 -                                r->n_dcon = r->n_lval;
  219+                                r->n_dcon = FLOAT_CAST(r->n_lval, r->n_type);
220220                         switch (o) {
 221221                         case PLUS:
<>222 -                                l->n_dcon += r->n_dcon; break;
  222+                                l->n_dcon = FLOAT_PLUS(l->n_dcon, r->n_dcon);
  223+                                break;
223224                         case MINUS:
<>224 -                                l->n_dcon -= r->n_dcon; break;
  225+                                l->n_dcon = FLOAT_MINUS(l->n_dcon, r->n_dcon);
  226+                                break;
225227                         case MUL:
<>226 -                                l->n_dcon *= r->n_dcon; break;
  228+                                l->n_dcon = FLOAT_MUL(l->n_dcon, r->n_dcon);
  229+                                break;
227230                         case DIV:
<>228 -                                if (r->n_dcon == 0)
  231+                                if (FLOAT_ISZERO(r->n_dcon))
229232                                         goto runtime;
<>230 -                                else
 231 -                                        l->n_dcon /= r->n_dcon;
  233+                                l->n_dcon = FLOAT_DIV(l->n_dcon, r->n_dcon);
  234+                                break;
232235                         }
 233236                         l->n_op = FCON;
 234237                         l->n_type = DOUBLE;
     
 !
12791282         if (p->n_op == ICON) {
 12801283                 if (t == DOUBLE || t == FLOAT) {
 12811284                         p->n_op = FCON;
<>1282 -                        if (ISUNSIGNED(p->n_type))
 1283 -                                p->n_dcon = (U_CONSZ) p->n_lval;
 1284 -                        else
 1285 -                                p->n_dcon = p->n_lval;
  1285+                        p->n_dcon = FLOAT_CAST(p->n_lval, p->n_type);
<_12861286                         p->n_type = t;
 12871287                         p->n_qual = q;
 12881288                         p->n_sue = MKSUE(t);
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 06:56 +0200