scc

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

commit 6981fdf248be1f4a15a9b8fd0296111fba9ae2dd
parent be7c5f83d4655f77d592b626a702dd2da07c3fb8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Jul 2014 19:17:48 +0200

Simplify intermediate code for functions

We don't need assign a identifier id to the functions, because
they are simply called or defined, but there is no needed of
check anything. The only important parameter is the name.

Diffstat:
Mcc1/code.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/cc1/code.c b/cc1/code.c @@ -189,10 +189,7 @@ emitprint(Node *np) void emitfun(Symbol *sym) { - printf("%c%d\tn%s%s\n", - sym->s.isglobal ? 'X' : 'Y', - sym->id, sym->name, - sym->s.isdefined ? "\t{" : ""); + printf("%c%s\t{\n", sym->s.isglobal ? 'X' : 'Y', sym->name); } void