Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.65
 
1.66
 
MAIN:ragge:20030620143900
 
pftn.c
_>2222         r = argcast(r, t, d, s); *p = *r; r->n_op = FREE;
 2323 
 2424 /*
<> 25+ * Info stored for delaying string printouts.
  26+ */
  27+struct strsched {
  28+        struct strsched *next;
  29+        int locctr;
  30+        struct symtab *sym;
  31+} *strpole;
  32+
  33+/*
2534  * Argument list member info when storing prototypes.
 2635  */
 2736 union arglist {
     
 !
8493     struct suedef *, OFFSZ off);
 8594 void gotscal(void);
 8695 static void ssave(struct symtab *);
<> 96+static void strprint(void);
8797 
 8898 int ddebug = 0;
 8999 
     
 !
441451         autooff = AUTOINIT;
 442452         minrvar = regvar = MAXRVAR;
 443453         reached = 1;
<> 454+
  455+        if (isinlining)
  456+                inline_end();
  457+        inline_prtout();
  458+
  459+        strprint();
  460+
444461         tmpfree(); /* Release memory resources */
 445462         locctr(DATA);
 446463 }
     
 !
11191136 strend(struct stri *si)
 11201137 {
 11211138         struct symtab *s;
<>1122 -        int lxarg, i, val, strtemp, strlab;
  1139+        int lxarg, i, val;
11231140         char *wr = si->str;
 11241141         NODE *p;
 11251142 
     
 !
11621179                 vfdalign(ALPOINT);
 11631180         }
 11641181 
<>1165 -        if (isinlining)
 1166 -                goto inl;
 1167 -
11681182         /* If an identical string is already emitted, just forget this one */
 11691183         si->str = addstring(si->str);   /* enter string in string table */
 11701184         s = lookup(si->str, SSTRING);   /* check for existance */
 11711185 
 11721186         if (s->soffset == 0) { /* No string */
<> 1187+                struct strsched *sc;
11731188                 s->sclass = ILABEL;
 11741189 
<>1175 -                 /* set up location counter */
 1176 -inl:            strtemp = locctr(blevel==0 ? ISTRNG : STRNG);
 1177 -                deflab(strlab = getlab());
 1178 -                if (isinlining == 0)
 1179 -                        s->soffset = strlab;
  1190+                /*
  1191+                 * Delay printout of this string until after the current
  1192+                 * function, or the end of the statement.
  1193+                 */
  1194+                sc = tmpalloc(sizeof(struct strsched));
  1195+                sc->locctr = blevel==0 ? ISTRNG : STRNG;
  1196+                sc->sym = s;
  1197+                sc->next = strpole;
  1198+                strpole = sc;
  1199+                s->soffset = getlab();
  1200+        }
11801201 
<> 1202+        p = buildtree(STRING, NIL, NIL);
  1203+        p->n_df = tmpalloc(sizeof(union dimfun));
  1204+        p->n_df->ddim = si->len+1;
  1205+        p->n_sp = s;
  1206+        return(p);
  1207+}
  1208+
  1209+/*
  1210+ * Print out new strings, before temp memory is cleared.
  1211+ */
  1212+void
  1213+strprint()
  1214+{
  1215+        char *wr;
  1216+        int i, val;
  1217+
  1218+        while (strpole != NULL) {
  1219+                locctr(strpole->locctr);
  1220+                deflab(strpole->sym->soffset);
  1221+
11811222                 i = 0;
<> 1223+                wr = strpole->sym->sname;
11821224                 while (*wr != 0) {
 11831225                         if (*wr++ == '\\')
 11841226                                 val = esccon(&wr);
     
 !
11891231                 }
 11901232                 bycode(0, i++);
 11911233                 bycode(-1, i);
<>1192 -                (void) locctr(blevel==0 ? ilocctr : strtemp);
 1193 -        } else {
 1194 -                strlab = s->soffset;
 1195 -                i = si->len+1;
  1234+                strpole = strpole->next;
11961235         }
<>1197 -
 1198 -        p = buildtree(STRING, NIL, NIL);
 1199 -        p->n_df = tmpalloc(sizeof(union dimfun));
 1200 -        p->n_df->ddim = i;
 1201 -        if (isinlining) {
 1202 -                p->n_sp = permalloc(sizeof(struct symtab_hdr));
 1203 -                p->n_sp->sclass = ILABEL;
 1204 -                p->n_sp->soffset = strlab;
 1205 -        } else
 1206 -                p->n_sp = s;
 1207 -
 1208 -        return(p);
<_12091236 }
 12101237 
 12111238 /*
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-20 14:42 +0100