Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.11
 
1.12
 
MAIN:ragge:20021026151837
 
pftn.c
_>438438         struct symtab *p;
 439439         NODE *q;
 440440         argoff = ARGINIT;
<> 441+
441442 # ifndef BUG1
<>442 -        if( ddebug > 2) printf("dclargs()\n");
  443+        if (ddebug > 2)
  444+                printf("dclargs()\n");
443445 # endif
<>444 -        for( i=0; i<paramno; ++i ){
 445 -                if( (j = paramstk[i]) < 0 ) continue;
  446+        for (i = 0; i < paramno; ++i) {
  447+                if ((j = paramstk[i]) < 0)
  448+                        continue;
446449                 p = &stab[j];
 447450 # ifndef BUG1
<>448 -                if( ddebug > 2 ){
  451+                if (ddebug > 2) {
449452                         printf("\t%s (%d) ",p->sname, j);
 450453                         tprint(p->stype);
 451454                         printf("\n");
<>452 -                        }
  455+                }
453456 # endif
<>454 -                if( p->stype == FARG ) {
  457+                if (p->stype == FARG) {
455458                         q = block(FREE,NIL,NIL,INT,0,INT);
 456459                         q->tn.rval = j;
<>457 -                        defid( q, PARAM );
 458 -                        }
 459 -                FIXARG(p); /* local arg hook, eg. for sym. debugger */
 460 -                oalloc( p, &argoff );  /* always set aside space, even for register arguments */
  460+                        defid(q, PARAM);
461461                 }
<> 462+                FIXARG(p); /* local arg hook, eg. for sym. debugger */
  463+          /* always set aside space, even for register arguments */
  464+                oalloc(p, &argoff);
  465+        }
462466         cendarg();
 463467         (void) locctr(PROG);
 464468         defalign(ALINT);
 465469         ftnno = getlab();
<>466 -        bfcode( paramstk, paramno );
  470+        bfcode(paramstk, paramno);
467471         paramno = 0;
 468472 }
 469473 
     
 !
13041308         int off;
 13051309 
 13061310         off = *poff;
<>1307 -        SETOFF( off, alignment );
 1308 -        if( (offsz-off) <  size ){
 1309 -                if( instruct!=INSTRUCT )cerror("too many local variables");
 1310 -                else cerror("Structure too large");
 1311 -                }
  1311+        SETOFF(off, alignment);
  1312+        if ((offsz-off) <  size) {
  1313+                if (instruct != INSTRUCT)
  1314+                        cerror("too many local variables");
  1315+                else
  1316+                        cerror("Structure too large");
  1317+        }
13121318         *poff = off+size;
<>1313 -        return( off );
  1319+        return (off);
13141320 }
 13151321 
 13161322 /*
     
 !
13221328         int al, off, tsz;
 13231329         int noff;
 13241330 
<>1325 -        al = talign( p->stype, p->sizoff );
  1331+        al = talign(p->stype, p->sizoff);
13261332         noff = off = *poff;
<>1327 -        tsz = tsize( p->stype, p->dimoff, p->sizoff );
  1333+        tsz = tsize(p->stype, p->dimoff, p->sizoff);
13281334 #ifdef BACKAUTO
<>1329 -        if( p->sclass == AUTO ){
 1330 -                if( (offsz-off) < tsz ) cerror("too many local variables");
  1335+        if (p->sclass == AUTO) {
  1336+                if ((offsz-off) < tsz)
  1337+                        cerror("too many local variables");
13311338                 noff = off + tsz;
<>1332 -                SETOFF( noff, al );
  1339+                SETOFF(noff, al);
13331340                 off = -noff;
<>1334 -                }
 1335 -        else
  1341+        } else
13361342 #endif
<>1337 -                if( p->sclass == PARAM && ( tsz < SZINT ) ){
 1338 -                        off = upoff( SZINT, ALINT, &noff );
 1339 -# ifndef RTOLBYTES
 1340 -                        off = noff - tsz;
  1343+#ifdef PARAMS_UPWARD
  1344+        if (p->sclass == PARAM) {
  1345+                if ((offsz-off) < tsz)
  1346+                        cerror("too many parameters");
  1347+                noff = off + tsz;
  1348+                if (tsz < SZINT)
  1349+                        al = ALINT;
  1350+                SETOFF(noff, al);
  1351+                off = -noff;
  1352+
  1353+        } else
13411354 #endif
<>1342 -                        }
 1343 -                else
 1344 -                {
 1345 -                off = upoff( tsz, al, &noff );
 1346 -                }
  1355+        if (p->sclass == PARAM && (tsz < SZINT)) {
  1356+                off = upoff(SZINT, ALINT, &noff);
  1357+#ifndef RTOLBYTES
  1358+                off = noff - tsz;
  1359+#endif
  1360+        } else {
  1361+                off = upoff(tsz, al, &noff);
  1362+        }
13471363 
<>1348 -        if( p->sclass != REGISTER ){ /* in case we are allocating stack space for register arguments */
 1349 -                if( p->offset == NOOFFSET ) p->offset = off;
 1350 -                else if( off != p->offset ) return(1);
 1351 -                }
  1364+        if (p->sclass != REGISTER) {
  1365+        /* in case we are allocating stack space for register arguments */
  1366+                if (p->offset == NOOFFSET)
  1367+                        p->offset = off;
  1368+                else if(off != p->offset)
  1369+                        return(1);
  1370+        }
<_13521371 
 13531372         *poff = noff;
 13541373         return(0);
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-11-01 02:50 +0100