cs = (struct nmlist *)Tblock(sizeof(struct nmlist));
cs->hclass = STATIC;
cs->hoffset = cval;
+#if 1 /* one-pass version */
+ /* really should change this to use nblock and fill in nmlist above better */
+ *cp0 = (union tree *)Tblock(sizeof(struct tname));
+ (*cp0)->n.op = NAME;
+ (*cp0)->n.type = unscflg? ARRAY+UNCHAR:ARRAY+CHAR;
+ (*cp0)->n.subsp = &nchstr;
+ (*cp0)->n.strp = (union str *)NULL;
+ (*cp0)->n.tr1 = (union tree *)cs;
+ (*cp0)->n.class = STATIC;
+ (*cp0)->n.regno = 0;
+ (*cp0)->n.offset = 0;
+ (*cp0)->n.nloc = cval;
+ cp0++;
+#else
*cp0++ = block(NAME, unscflg? ARRAY+UNCHAR:ARRAY+CHAR, &nchstr,
(union str *)NULL, (union tree *)cs, TNULL);
+#endif
+ /*printf("string %p\n", cp0[-1]);*/
tand:
if(cp0>=cmst+CMSIZ) {
union tree *tp;
if (ds->hclass == EXTERN) {
tp = (union tree *)Tblock(sizeof(struct xtname));
+ /*fprintf(stderr, "nblock xtname %p\n", tp);*/
tp->x.name = ds->name;
}
else {
tp = (union tree *)Tblock(sizeof(struct tname));
+ /*fprintf(stderr, "nblock tname %p\n", tp);*/
tp->n.nloc = ds->hoffset;
}
tp->n.op = NAME;
#define _va_start(argp, arg) va_start(argp)
#endif
#include "c0.h"
+#include "c1.h" /* rcexpr0() one-pass version */
/*
* Reduce the degree-of-reference by one.
* Write out a tree0.
*/
void rcexpr0(tp) register union tree *tp; {
+#if 1 /* one-pass version */
+ long outloc;
+#endif
/*
* Special optimization
*/
return;
}
}
+#if 1 /* one-pass version */
+ /* note: we need to put STRASG crap in */
+ regpanic = 0;
+ if (setjmp(jmpbuf)) {
+ regpanic = 10;
+ fseek(/*stdout*/temp_fp[temp_fi], outloc, 0);
+ }
+ nstack = 0;
+ panicposs = 0;
+ tp = optim(tp);
+ if (regpanic==0 && panicposs)
+ outloc = ftell(/*stdout*/temp_fp[temp_fi]);
+ rcexpr1(tp, efftab, 0);
+#else
treeout(tp, 0);
outcode("BN", EXPR, line);
+#endif
}
void treeout(tp, isstruct) register union tree *tp; int isstruct; {
register int i;
loop:
+ /*fprintf(stderr, "pname %p %d\n", p, p->t.op);*/
switch(p->t.op) {
case LCON:
regpanic = 0;
if (setjmp(jmpbuf)) {
regpanic = 10;
- fseek(stdout, outloc, 0);
+ fseek(/*stdout*/temp_fp[temp_fi], outloc, 0);
}
nstack = 0;
panicposs = 0;
*sp = tp = optim(*sp);
if (regpanic==0 && panicposs)
- outloc = ftell(stdout);
+ outloc = ftell(/*stdout*/temp_fp[temp_fi]);
if (op==CBRANCH)
cbranch1(tp, lbl, cond, 0);
else if (op==EXPR)
#define SFCON 24
#define LCON 25
#define SLCON 26
-#define NULLOP0 29 /* pass 0 only */
+#define NULLOP0 0/*29*/ /* pass 0 only */
#define NULLOP 218 /* interface version */
#define AUTOI 27 /* pass 1 only */