Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.27
 
1.28
 
MAIN:ragge:20030610135719
 
trees.c
_>132132                         l->n_op = ICON;
 133133                         l->n_type = INT;
 134134                         l->n_sue = MKSUE(INT);
<>135 -                        l->n_cdim = 0;
  135+                        l->n_dim = NULL;
136136                         return(l);
 137137                 case UNARY MINUS:
 138138                         if( l->n_op == FCON )
     
 !
292292                 q = (actions&TYPL) ? p->n_left : p->n_right;
 293293 
 294294                 p->n_type = q->n_type;
<>295 -                p->n_cdim = q->n_cdim;
  295+                p->n_dim = q->n_dim;
296296                 p->n_sue = q->n_sue;
 297297                 }
 298298 
     
 !
314314                                 /* make p look reasonable */
 315315                                 p->n_type = INT;
 316316                                 p->n_sue = MKSUE(INT);
<>317 -                                p->n_cdim = 0;
  317+                                p->n_dim = NULL;
318318                                 p->n_sp = sp;
 319319                                 p->n_lval = 0;
 320320                                 defid(p, SNULL);
 321321                                 break;
 322322                         }
 323323                         p->n_type = sp->stype;
<>324 -                        p->n_cdim = sp->dimoff;
  324+                        p->n_dim = sp->sdim;
325325                         p->n_sue = sp->ssue;
 326326                         p->n_lval = 0;
 327327                         p->n_sp = sp;
 328328                         /* special case: MOETY is really an ICON... */
 329329                         if (p->n_type == MOETY) {
 330330                                 p->n_sp = NULL;
 331331                                 p->n_lval = sp->soffset;
<>332 -                                p->n_cdim = 0;
  332+                                p->n_dim = NULL;
333333                                 p->n_type = ENUMTY;
 334334                                 p->n_op = ICON;
 335335                         }
 336336                         break;
 337337 
 338338                 case ICON:
 339339                         p->n_type = INT;
<>340 -                        p->n_cdim = 0;
  340+                        p->n_dim = NULL;
341341                         p->n_sue = MKSUE(INT);
 342342                         break;
 343343 
     
 !
352352 #endif
 353353                         p->n_lval = 0;
 354354                         p->n_sp = NULL;
<>355 -                        p->n_cdim = curdim;
356355                         break;
 357356 
 358357                 case FCON:
 359358                         p->n_lval = 0;
 360359                         p->n_rval = 0;
 361360                         p->n_type = FLOAT;
<>362 -                        p->n_cdim = 0;
  361+                        p->n_dim = NULL;
363362                         p->n_sue = MKSUE(FLOAT);
 364363                         break;
 365364 
 366365                 case DCON:
 367366                         p->n_lval = 0;
 368367                         p->n_rval = 0;
 369368                         p->n_type = DOUBLE;
<>370 -                        p->n_cdim = 0;
  369+                        p->n_dim = NULL;
371370                         p->n_sue = MKSUE(DOUBLE);
 372371                         break;
 373372 
     
 !
404403                                 }
 405404                         if( !ISPTR(l->n_type))uerror("illegal indirection");
 406405                         p->n_type = DECREF(l->n_type);
<>407 -                        p->n_cdim = l->n_cdim;
  406+                        p->n_dim = l->n_dim;
408407                         p->n_sue = l->n_sue;
 409408                         break;
 410409 
     
 !
416415                                 p = l->n_left;
 417416                         case NAME:
 418417                                 p->n_type = INCREF( l->n_type );
<>419 -                                p->n_cdim = l->n_cdim;
  418+                                p->n_dim = l->n_dim;
420419                                 p->n_sue = l->n_sue;
 421420                                 break;
 422421 
     
 !
478477                         {
 479478                                 struct suedef *sue;
 480479                                 TWORD t;
<>481 -                                int d;
  480+                                int *d;
482481 
 483482                                 if (l->n_sue != r->n_sue)
 484483                                         uerror("assignment of different structures");
 485484 
 486485                                 r = buildtree(UNARY AND, r, NIL);
 487486                                 t = r->n_type;
<>488 -                                d = r->n_cdim;
  487+                                d = r->n_dim;
489488                                 sue = r->n_sue;
 490489 
<>491 -                                l = block( STASG, l, r, t, d, sue);
  490+                                l = block(STASG, l, r, t, d, sue);
492491 
 493492                                 if( o == RETURN ){
 494493                                         p->n_op = FREE;
 495494                                         p = l;
 496495                                         break;
<>497 -                                        }
  496+                                }
498497 
 499498                                 p->n_op = UNARY MUL;
 500499                                 p->n_left = l;
     
 !
517516                         if (!ISFTN(p->n_type))
 518517                                 uerror("illegal function");
 519518                         p->n_type = DECREF(p->n_type);
<>520 -                        p->n_cdim = l->n_cdim;
  519+                        p->n_dim = l->n_dim;
521520                         p->n_sue = l->n_sue;
 522521                         if (l->n_op == UNARY AND && l->n_left->n_op == NAME &&
 523522                             l->n_left->n_sp != NULL && l->n_left->n_sp != NULL &&
     
 !
592591                 }
 593592 
 594593         if( p->n_type == STRTY || p->n_type == UNIONTY ){
<>595 -                p = block(STARG, p, NIL, p->n_type, p->n_cdim, p->n_sue);
  594+                p = block(STARG, p, NIL, p->n_type, p->n_dim, p->n_sue);
596595                 p->n_left = buildtree( UNARY AND, p->n_left, NIL );
 597596                 p = clocal(p);
 598597                 }
     
 !
739738 chkpun(NODE *p)
 740739 {
 741740         NODE *q;
<>742 -        int t1, t2, d1, d2, ref1, ref2;
  741+        int t1, t2, *d1, *d2, ref1, ref2;
743742 
 744743         t1 = p->n_left->n_type;
 745744         t2 = p->n_right->n_type;
     
 !
778777                                 werror("illegal structure pointer combination");
 779778                                 return;
 780779                         }
<>781 -                        d1 = p->n_left->n_cdim;
 782 -                        d2 = p->n_right->n_cdim;
  780+                        d1 = p->n_left->n_dim;
  781+                        d2 = p->n_right->n_dim;
783782                         for (;;) {
 784783                                 if (ISARY(t1)) {
<>785 -                                        if (dimtab[d1] != dimtab[d2]) {
  784+                                        if (*d1 != *d2) {
786785                                                 werror("illegal array "
 787786                                                     "size combination");
 788787                                                 return;
     
 !
804803 {
 805804         struct suedef *sue;
 806805         TWORD t;
<>807 -        int d, dsc, align;
  806+        int *d, dsc, align;
808807         OFFSZ off;
 809808         register struct symtab *q;
 810809 
     
 !
822821                 p->n_type = PTR+UNIONTY;
 823822 
 824823         t = INCREF(q->stype);
<>825 -        d = q->dimoff;
  824+        d = q->sdim;
826825         sue = q->ssue;
 827826 
 828827         p = makety(p, t, d, sue);
     
 !
900899 NODE *
 901900 bpsize(NODE *p)
 902901 {
<>903 -        return(offcon(psize(p), p->n_type, p->n_cdim, p->n_sue));
  902+        return(offcon(psize(p), p->n_type, p->n_dim, p->n_sue));
904903 }
 905904 
 906905 /*
     
 !
916915                 return(SZINT);
 917916         }
 918917         /* note: no pointers to fields */
<>919 -        return(tsize(DECREF(p->n_type), p->n_cdim, p->n_sue));
  918+        return(tsize(DECREF(p->n_type), p->n_dim, p->n_sue));
920919 }
 921920 
 922921 /*
     
 !
983982 
 984983         if( ISARY( p->n_type) ){
 985984                 p->n_type = DECREF( p->n_type );
<>986 -                ++p->n_cdim;
  985+                ++p->n_dim;
987986                 return( buildtree( UNARY AND, p, NIL ) );
<>988 -                }
  987+        }
989988         if( ISFTN( p->n_type) )
 990989                 return( buildtree( UNARY AND, p, NIL ) );
 991990 
     
 !
10271026 
 10281027         struct suedef *sue, *sue2;
 10291028         TWORD t1, t2, t;
<>1030 -        int o, d2, d;
  1029+        int o, *d2, *d;
10311030 
 10321031         o = p->n_op;
 10331032         t = t1 = p->n_left->n_type;
 10341033         t2 = p->n_right->n_type;
<>1035 -        d = p->n_left->n_cdim;
 1036 -        d2 = p->n_right->n_cdim;
  1034+        d = p->n_left->n_dim;
  1035+        d2 = p->n_right->n_dim;
10371036         sue = p->n_left->n_sue;
 10381037         sue2 = p->n_right->n_sue;
 10391038 
     
 !
10901089         if( o!=MINUS && !logop(o) ){
 10911090 
 10921091                 p->n_type = t;
<>1093 -                p->n_cdim = d;
  1092+                p->n_dim = d;
10941093                 p->n_sue = sue;
 10951094                 }
 10961095 
     
 !
11701169                 if ( tu == ENUMTY ) {/* always asgop */
 11711170                         p->n_right = makety( p->n_right, INT, 0, MKSUE(INT));
 11721171                         p->n_right->n_type = tu;
<>1173 -                        p->n_right->n_cdim = p->n_left->n_cdim;
  1172+                        p->n_right->n_dim = p->n_left->n_dim;
11741173                         p->n_right->n_sue = p->n_left->n_sue;
 11751174                         }
 11761175                 else
     
 !
11791178 
 11801179         if( asgop(o) ){
 11811180                 p->n_type = p->n_left->n_type;
<>1182 -                p->n_cdim = p->n_left->n_cdim;
  1181+                p->n_dim = p->n_left->n_dim;
11831182                 p->n_sue = p->n_left->n_sue;
 11841183                 }
 11851184         else if( !logop(o) ){
 11861185                 p->n_type = tu;
<>1187 -                p->n_cdim = 0;
  1186+                p->n_dim = NULL;
11881187                 p->n_sue = MKSUE(t);
 11891188                 }
 11901189 
     
 !
11971196         }
 11981197 
 11991198 NODE *
<>1200 -makety(NODE *p, TWORD t, int d, struct suedef *sue)
  1199+makety(NODE *p, TWORD t, int *d, struct suedef *sue)
12011200 {
 12021201         /* make p into type t by inserting a conversion */
 12031202 
 12041203         if( p->n_type == ENUMTY && p->n_op == ICON ) econvert(p);
 12051204         if( t == p->n_type ){
<>1206 -                p->n_cdim = d;
  1205+                p->n_dim = d;
12071206                 p->n_sue = sue;
 12081207                 return(p);
 12091208         }
     
 !
12671266         }
 12681267 
 12691268 NODE *
<>1270 -block(int o, NODE *l, NODE *r, TWORD t, int d, struct suedef *sue)
  1269+block(int o, NODE *l, NODE *r, TWORD t, int *d, struct suedef *sue)
12711270 {
 12721271         register NODE *p;
 12731272 
     
 !
12791278         p->n_right = r;
 12801279         p->n_type = t;
 12811280         p->n_su = 0;
<>1282 -        p->n_cdim = d;
  1281+        p->n_dim = d;
12831282         p->n_sue = sue;
 12841283         return(p);
 12851284         }
     
 !
15611560 {
 15621561         int i;
 15631562 
<>1564 -        i = tsize( p->n_type, p->n_cdim, p->n_sue )/SZCHAR;
  1563+        i = tsize( p->n_type, p->n_dim, p->n_sue )/SZCHAR;
15651564 
 15661565         tfree(p);
 15671566         if (i <= 0)
     
 !
15891588                 printf( ", %d, ", p->n_rval );
 15901589                 }
 15911590         tprint( p->n_type );
<>1592 -        printf( ", %d, %p\n", p->n_cdim, p->n_sue );
  1591+        printf( ", %p, %p\n", p->n_dim, p->n_sue );
15931592         return 0;
 15941593 }
 15951594 # endif
     
 !
16721671         case STCALL:
 16731672         case UNARY STCALL:
 16741673                 /* set up size parameters */
<>1675 -                p->n_stsize = (tsize(STRTY,p->n_left->n_cdim,p->n_left->n_sue)+SZCHAR-1)/SZCHAR;
  1674+                p->n_stsize = (tsize(STRTY,p->n_left->n_dim,p->n_left->n_sue)+SZCHAR-1)/SZCHAR;
<_16761675                 p->n_stalign = talign(STRTY,p->n_left->n_sue)/SZCHAR;
 16771676                 break;
 16781677 
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-30 23:56 +0200