From e8ed0dcf0304564bbab8f4c0432cb31964705afc Mon Sep 17 00:00:00 2001 From: Nick Downing Date: Fri, 10 Feb 2017 21:55:14 +1100 Subject: [PATCH] Make cbranch0() route into cbranch1(), doesn't add STRASG node yet, need to fix --- c04.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/c04.c b/c04.c index e39dbae..00632a2 100644 --- a/c04.c +++ b/c04.c @@ -38,8 +38,25 @@ int incref0(t) register int t; { * if the tree0's value is non-zero together with the cond. */ void cbranch0(t, lbl, cond) union tree *t; int lbl; int cond; { +#if 1 /* one-pass version */ + long outloc; + + /* 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; + t = optim(t); + if (regpanic==0 && panicposs) + outloc = ftell(/*stdout*/temp_fp[temp_fi]); + cbranch1(t, lbl, cond, 0); +#else treeout(t, 0); outcode("BNNN", CBRANCH, lbl, cond, line); +#endif } /* @@ -80,6 +97,7 @@ void rcexpr0(tp) register union tree *tp; { #endif } +#if 0 void treeout(tp, isstruct) register union tree *tp; int isstruct; { register struct nmlist *hp; register int nextisstruct; @@ -158,6 +176,7 @@ void treeout(tp, isstruct) register union tree *tp; int isstruct; { if (nextisstruct && isstruct==0) outcode("BNN", STRASG, STRUCT, tp->t.strp->S.ssize); } +#endif /* * Generate a branch0 -- 2.34.1