scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 23597ee476bd27f80b8f3f88c7ba5811ee2e94b7
parent 8cc7f57a951c9807a7d55cbb7ed1a9cb456930e2
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 21 Mar 2015 04:20:35 -0400

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.

Diffstat:
Mcc2/cgen.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/cc2/cgen.c b/cc2/cgen.c @@ -410,7 +410,7 @@ static void (*opnodes[])(Node *) = { }; static void -cgen(Node *np, Node *parent) +cgen(Node *np) { Node *lp, *rp; @@ -423,17 +423,17 @@ cgen(Node *np, Node *parent) 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) 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 @@ generate(void) } for (stmt = curfun->u.f.body; np = *stmt; ++stmt) - cgen(np, NULL); + cgen(np); code(MOV, &regs[SP], &regs[IX]); retlabel.u.pc = pc;