ref: 677232c01056366ed709373ebe020f2add080136
parent: 36efc76de7867528cd04d01e3265ff8a61d1f4df
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jul 19 18:17:04 EDT 2015
Remove @ statements This was a hack that allowed me to use cc1 as frontend for a C interpreter. This is not needed anymore?
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -254,7 +254,6 @@
OESTRUCT,
OELOOP,
OBLOOP,
- OPRINT,
OFUN,
ORET,
ODECL,
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -120,7 +120,6 @@
[OESTRUCT] = emittext,
[OELOOP] = emittext,
[OBLOOP] = emittext,
- [OPRINT] = emitprint,
[OFUN] = emitfun,
[ORET] = emitret,
[ODECL] = emitdcl,
@@ -249,17 +248,6 @@
emitnode(np);
putchar('\n');
- freetree(np);
-}
-
-static void
-emitprint(unsigned op, void *arg)
-{
- Node *np = arg;
-
- emitnode(np);
- printf("\tk%c\n", np->type->letter);
- fflush(stdout);
freetree(np);
}
--- a/cc1/stmt.c
+++ b/cc1/stmt.c
@@ -353,11 +353,6 @@
case IDEN:
fun = (ahead() == ':') ? Label : stmtexp;
break;
- case '@':
- next();
- np = expr();
- emit(OPRINT, np);
- return;
}
(*fun)(lbreak, lcont, lswitch);
}