Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.18
 
1.19
 
MAIN:ragge:20110702151159
 
local.c
_>5858         register struct symtab *q;
 5959         register NODE *r;
 6060         register int o;
<>61 -        register int m, ml;
  61+        register int ml;
6262 
 6363 
 6464 #ifdef PCC_DEBUG
     
 !
9696 
 9797                 /* pointers all have the same representation; the type is inherited */
 9898 
<>99 -        inherit:
10099                 p->n_left->n_type = p->n_type;
 101100                 p->n_left->n_df = p->n_df;
 102101                 p->n_left->n_ap = p->n_ap;
 103102                 r = p->n_left;
 104103                 nfree(p);
<>105 -                return( r );
  104+                p = r;
  105+                break;
106106 
<>107 -        case SCONV:
 108 -                m = (p->n_type == FLOAT || p->n_type == DOUBLE );
 109 -                ml = (p->n_left->n_type == FLOAT || p->n_left->n_type == DOUBLE );
 110 -                if( m != ml ) break;
 111 -
 112 -                /* now, look for conversions downwards */
 113 -
 114 -                m = p->n_type;
 115 -                ml = p->n_left->n_type;
 116 -                if( p->n_left->n_op == ICON ){ /* simulate the conversion here */
 117 -                        CONSZ val;
 118 -                        val = p->n_left->n_lval;
 119 -                        switch( m ){
 120 -                        case CHAR:
 121 -                                p->n_left->n_lval = (char) val;
 122 -                                break;
 123 -                        case UCHAR:
 124 -                                p->n_left->n_lval = val & 0XFF;
 125 -                                break;
 126 -                        case USHORT:
 127 -                                p->n_left->n_lval = val & 0XFFFFL;
 128 -                                break;
 129 -                        case SHORT:
 130 -                                p->n_left->n_lval = (short)val;
 131 -                                break;
 132 -                        case UNSIGNED:
 133 -                                p->n_left->n_lval = val & 0xFFFFFFFFL;
 134 -                                break;
 135 -                        case INT:
 136 -                                p->n_left->n_lval = (int)val;
 137 -                                break;
 138 -                                }
 139 -                        p->n_left->n_type = m;
 140 -                        }
 141 -                else {
 142 -                        /* meaningful ones are conversion of int to char, int to short,
 143 -                           and short to char, and unsigned version of them */
 144 -                        if( m==CHAR || m==UCHAR ){
 145 -                                if( ml!=CHAR && ml!= UCHAR ) break;
 146 -                                }
 147 -                        else if( m==SHORT || m==USHORT ){
 148 -                                if( ml!=CHAR && ml!=UCHAR && ml!=SHORT && ml!=USHORT ) break;
 149 -                                }
 150 -                        }
 151 -
 152 -                /* clobber conversion */
 153 -                if( tlen(p) == tlen(p->n_left) ) goto inherit;
 154 -                r = p->n_left;
 155 -                nfree(p);
 156 -                return( r );  /* conversion gets clobbered */
 157 -
158107         case RS:
 159108         case RSEQ:
 160109                 /* convert >> to << with negative shift count */
     
 !
173122                     RETREG(CHAR) : RETREG(p->n_type);
 174123                 break;
 175124 
<> 125+        case SCONV:
  126+                if (p->n_type == INT && p->n_left->n_type == UNSIGNED) {
  127+                        r = p->n_left;
  128+                        nfree(p);
  129+                        p = r;
  130+                }
  131+                break;
  132+
176133         case STCALL:
 177134                 /* see if we have been here before */
 178135                 for (r = p->n_right; r->n_op == CM; r = r->n_left)
     
 !
184141         case USTCALL:
 185142                 /* Allocate buffer on stack to bounce via */
 186143                 /* create fake symtab here */
<>187 -                /* first check if we have been here before */
188144                 q = getsymtab("77fake", STEMP);
 189145                 q->stype = BTYPE(p->n_type);
 190146                 q->sdf = p->n_df;
     
 !
195151                 r1arg(p, buildtree(ADDROF, nametree(q), 0));
 196152                 break;
 197153         }
<> 154+#ifdef PCC_DEBUG
  155+        if (xdebug) {
  156+                printf("clocal end(%p)\n", p);
  157+                if (xdebug>1)
  158+                        fwalk(p, eprint, 0);
  159+        }
  160+#endif
<_198161 
 199162         return(p);
 200163 }
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-10-31 13:14 +0100