Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.15
 
1.16
 
MAIN:ragge:20140603201950
 
local.c
     
 !
_> 37+        TWORD t;
     
 !
<> 40+#ifdef PCC_DEBUG
  41+        if (xdebug) {
  42+                printf("clocal\n");
  43+                fwalk(p, eprint, 0);
  44+        }
  45+#endif
  46+
     
 !
<> 53+                case PARAM:
     
 !
<>46 -                        /* fake up a structure reference */
 47 -                        r = block(REG, NIL, NIL, PTR+STRTY, 0, 0);
 48 -                        r->n_lval = 0;
 49 -                        r->n_rval = FPREG;
 50 -                        p = stref(block(STREF, r, p, 0, 0, 0));
  55+                        if (0 && q->soffset < MAXZP * SZINT &&
  56+                            q->sclass != PARAM) {
  57+                                p->n_lval = -(q->soffset/SZCHAR) + ZPOFF*2;
  58+                                p->n_sp = NULL;
  59+                        } else {
  60+                                /* fake up a structure reference */
  61+                                r = block(REG, NIL, NIL, PTR+STRTY, 0, 0);
  62+                                r->n_lval = 0;
  63+                                r->n_rval = FPREG;
  64+                                p = stref(block(STREF, r, p, 0, 0, 0));
  65+                        }
     
 !
<>61 -                return(buildtree(o==PMCONV?MUL:DIV, p->n_left, p->n_right));
  76+                p = (buildtree(o==PMCONV?MUL:DIV, p->n_left, p->n_right));
  77+                break;
     
 !
<> 80+                t = p->n_type;
  81+                if (t == INCREF(CHAR) || t == INCREF(UCHAR) ||
  82+                    t == INCREF(BOOL) || t == INCREF(VOID))
  83+                        break;
     
 !
<> 85+                t = l->n_type;
  86+                if (t == INCREF(CHAR) || t == INCREF(UCHAR) ||
  87+                    t == INCREF(BOOL) || t == INCREF(VOID))
  88+                        break;
  89+                if (p->n_type <= UCHAR || l->n_type <= UCHAR)
  90+                        break; /* must do runtime ptr conv */
     
 !
<> 94+                if (l->n_op == ICON && l->n_sp == NULL)
  95+                        goto delp;
     
 !
<>74 -                nfree(p);
 75 -                p = l;
  102+                p = nfree(p);
     
 !
<> 106+#ifdef PCC_DEBUG
  107+        if (xdebug) {
  108+                printf("clocal end\n");
  109+                fwalk(p, eprint, 0);
  110+        }
  111+#endif
  112+
     
 !
<> 376+        NODE *l, *r;
     
 !
<>344 -        if (o != FCON)
 345 -                return;
  379+        switch (o) {
  380+        case NAME: /* reading from a name must be done with a subroutine */
  381+                if (p->n_type != CHAR && p->n_type != UCHAR)
  382+                        break;
  383+                l = buildtree(ADDROF, ccopy(p), NIL);
  384+                r = block(NAME, NIL, NIL, INT, 0, 0);
     
 !
<>347 -        sp = inlalloc(sizeof(struct symtab));
 348 -        sp->sclass = STATIC;
 349 -        sp->sap = 0;
 350 -        sp->slevel = 1; /* fake numeric label */
 351 -        sp->soffset = getlab();
 352 -        sp->sflags = 0;
 353 -        sp->stype = p->n_type;
 354 -        sp->squal = (CON >> TSHIFT);
  386+                r->n_sp = lookup(addname("__nova_rbyte"), SNORMAL);
  387+                if (r->n_sp->sclass == SNULL) {
  388+                        r->n_sp->sclass = EXTERN;
  389+                        r->n_sp->stype = INCREF(p->n_type)+(FTN-PTR);
  390+                }
  391+                r->n_type = r->n_sp->stype;
  392+                r = clocal(r);
  393+                r = optim(buildtree(CALL, r, l));
  394+                *p = *r;
  395+                nfree(r);
  396+                break;
     
 !
<>356 -        defloc(sp);
 357 -        ninval(0, tsize(sp->stype, sp->sdf, sp->sap), p);
  398+        case FCON:
  399+                sp = inlalloc(sizeof(struct symtab));
  400+                sp->sclass = STATIC;
  401+                sp->sap = 0;
  402+                sp->slevel = 1; /* fake numeric label */
  403+                sp->soffset = getlab();
  404+                sp->sflags = 0;
  405+                sp->stype = p->n_type;
  406+                sp->squal = (CON >> TSHIFT);
     
 !
<>359 -        p->n_op = NAME;
 360 -        p->n_lval = 0;
 361 -        p->n_sp = sp;
  408+                defloc(sp);
  409+                ninval(0, tsize(sp->stype, sp->sdf, sp->sap), p);
     
 !
<> 411+                p->n_op = NAME;
  412+                p->n_lval = 0;
  413+                p->n_sp = sp;
  414+        }
     
 !
<>400 -        p = bcon(0);
 401 -        p->n_lval = off/SZINT;  /* Default */
 402 -        if (ISPTR(DECREF(t)))
 403 -                return p;
 404 -        if (t == VOID || t == CHAR || t == UCHAR)
  452+        p = bcon(off/SZINT);
  453+        if (t == INCREF(CHAR) || t == INCREF(UCHAR) || t == INCREF(VOID))
     
 !
<> 625+ * On Nova we put symbols over the size of an int above 24 bytes in
  626+ * offset and leave zeropage for small vars.
     
 !
<_ 631+#if 0
  632+        if (sp->sclass != AUTO)
  633+                return; /* not our business */
  634+        if (ISPTR(sp->stype) || sp->stype < LONG)
  635+                return;
  636+        if (sp->soffset >= (MAXZP * SZINT))
  637+                return; /* already above */
  638+        /* have to move */
  639+        /* XXX remember old autooff for reorg of smaller vars */
  640+        if (autooff < MAXZP * SZINT)
  641+                autooff = MAXZP * SZINT;
  642+        oalloc(sp, &autooff);
  643+#endif
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-21 20:13 +0200