ref: 23597ee476bd27f80b8f3f88c7ba5811ee2e94b7
parent: 8cc7f57a951c9807a7d55cbb7ed1a9cb456930e2
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Mar 21 00:20:35 EDT 2015
Remove additional parameter of cgen() This parameter was not used at all. It was used in the past, but not now. Maybe we will have to use it again in the future, then we will add it again.
--- a/cc2/cgen.c
+++ b/cc2/cgen.c
@@ -410,7 +410,7 @@
};
static void
-cgen(Node *np, Node *parent)
+cgen(Node *np)
{
Node *lp, *rp;
@@ -423,9 +423,9 @@
lp = np->left;
rp = np->right;
if (!lp) {
- cgen(rp, np);
+ cgen(rp);
} else if (!rp) {
- cgen(lp, np);
+ cgen(lp);
} else {
Node *p, *q;
if (lp->complex > rp->complex)
@@ -432,8 +432,8 @@
p = lp, q = rp;
else
p = rp, q = lp;
- cgen(p, np);
- cgen(q, np);
+ cgen(p);
+ cgen(q);
}
(*opnodes[np->op])(np);
}
@@ -459,7 +459,7 @@
}
for (stmt = curfun->u.f.body; np = *stmt; ++stmt)
- cgen(np, NULL);
+ cgen(np);
code(MOV, ®s[SP], ®s[IX]);
retlabel.u.pc = pc;