From: Alex Smith Date: Thu, 2 Sep 2010 22:33:15 +0000 (+0100) Subject: Show unary bitwidths in optimiser debug output X-Git-Tag: 0.29~41^2~15 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=e6854b1f54457cc5c9f155dcdff3dc627057b93f;p=intercal.git Show unary bitwidths in optimiser debug output --- diff --git a/src/feh2.c b/src/feh2.c index c641242..d2d5288 100644 --- a/src/feh2.c +++ b/src/feh2.c @@ -658,19 +658,19 @@ void explexpr(node* np, FILE* fp) break; case AND: - (void) fprintf(fp, "(& "); + (void) fprintf(fp, "(&%d ", np->width); explexpr(np->rval, fp); (void) fprintf(fp, ")"); break; case OR: - (void) fprintf(fp, "(V "); + (void) fprintf(fp, "(V%d ", np->width); explexpr(np->rval, fp); (void) fprintf(fp, ")"); break; case XOR: - (void) fprintf(fp, "(? "); + (void) fprintf(fp, "(?%d ", np->width); explexpr(np->rval, fp); (void) fprintf(fp, ")"); break; @@ -678,7 +678,7 @@ void explexpr(node* np, FILE* fp) case FIN: if (ick_Base < 3) ick_lose(IE997, emitlineno, (const char *)NULL); - (void) fprintf(fp, "(^ "); + (void) fprintf(fp, "(^%d ", np->width); explexpr(np->rval, fp); (void) fprintf(fp, ")"); break; @@ -691,9 +691,9 @@ void explexpr(node* np, FILE* fp) if (np->opcode - WHIRL + 3 > ick_Base) ick_lose(IE997, emitlineno, (const char *)NULL); if(np->opcode == WHIRL) - (void) fprintf(fp, "(@ "); + (void) fprintf(fp, "(@%d ", np->width); else - (void) fprintf(fp, "(%d@ ", np->opcode - WHIRL + 1); + (void) fprintf(fp, "(%d@%d ", np->opcode - WHIRL + 1, np->width); explexpr(np->rval, fp); (void) fprintf(fp, ")"); break;