shithub: scc

Download patch

ref: 6981fdf248be1f4a15a9b8fd0296111fba9ae2dd
parent: be7c5f83d4655f77d592b626a702dd2da07c3fb8
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Jul 17 15:17:48 EDT 2014

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.

--- a/cc1/code.c
+++ b/cc1/code.c
@@ -189,10 +189,7 @@
 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