shithub: scc

Download patch

ref: 989ac22e7b289abcd175369ff890d14c912eb540
parent: 7aa7271a9ad01e7368fffa0c5d7426e86a696dcb
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Nov 16 01:37:05 EST 2014

Change emitsym2() to emitvar()

emitsym2 had no special meaning, it was only the second part or emitsym,
but emitvar means that it only emits variables (struct fields are
considered variables to).

--- a/cc1/code.c
+++ b/cc1/code.c
@@ -80,7 +80,7 @@
 }
 
 static void
-emitsym2(Symbol *sym)
+emitvar(Symbol *sym)
 {
 	char c;
 
@@ -130,7 +130,7 @@
 emitsym(Node *np)
 {
 	putchar('\t');
-	(np->b.constant) ? emitconst(np) : emitsym2(np->u.sym);
+	(np->b.constant) ? emitconst(np) : emitvar(np->u.sym);
 }
 
 static void
@@ -142,7 +142,7 @@
 void
 emitdcl(Symbol *sym)
 {
-	emitsym2(sym);
+	emitvar(sym);
 	putchar('\t');
 	emittype(sym->type);
 	putchar('\n');
@@ -295,7 +295,7 @@
 	child = np->childs[0];
 	(*child->code)(child);
 	putchar('\t');
-	emitsym2(np->u.sym);
+	emitvar(np->u.sym);
 }
 
 Node *