ref: 9fa589f963e560b02cfecd13b724664a239693b6
parent: d7a8adfd00c4d92615387463382ba1e000c3b61c
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Apr 24 14:01:18 EDT 2014
Change order of emiting in emitcase It is better emit first the label and later the expression because it helps to detect what it is label and what it is expression.
--- a/code.c
+++ b/code.c
@@ -245,10 +245,9 @@
void
emitcase(Symbol *sym, Node *np)
{
- fputs("\tw", stdout);
- (*np->code)(np);
- putchar('\t');
- emitlabel(sym);
+ fputs("\tw\t", stdout);
+ printf("L%d", sym->id);
+ emitexp(np);
}
void