shithub: scc

Download patch

ref: 9fdb7c764740da5a852bb02ec407c8b72da8db95
parent: 0d0b0348c1e5864db9ccb539f98e49299833f68b
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Apr 16 14:28:18 EDT 2014

Update format of functions

This new format uses 'n' to allow pass a name to cc2

--- a/code.c
+++ b/code.c
@@ -167,7 +167,8 @@
 void
 emitfun(Symbol *sym)
 {
-	printf("X%s\n", sym->name);
+	printf("%c%d\tn%s\n",
+	       sym->s.isglobal ? 'X' : 'Y', sym->id, sym->name);
 }
 
 void