[hackers] [scc] Remove STRUCT emit() operators || Roberto E. Vargas Caballero
commit cdd649037ff739763ef976d4ca707ec021f24401
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Aug 4 17:26:29 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Aug 4 17:26:51 2015 +0200
Remove STRUCT emit() operators
These operators must be removed because they must be emited
in emittype(), like all the other types.
diff --git a/cc1/cc1.h b/cc1/cc1.h
index 206880d..7399403 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -260,12 +260,10 @@ enum {
OLABEL,
ODEFAULT,
OCASE,
- OSTRUCT,
OJUMP,
OBRANCH,
OEXPR,
OEFUN,
- OESTRUCT,
OELOOP,
OBLOOP,
OFUN,
diff --git a/cc1/code.c b/cc1/code.c
index 3d24fa8..f1994a4 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -56,11 +56,9 @@ char *optxt[] = {
[OLABEL] = "L%d\n",
[ODEFAULT] = "\tf\tL%d\n",
[OCASE] = "\tw\tL%d",
- [OSTRUCT] = "S%d\t(\n",
[OJUMP] = "\tj\tL%d\n",
[OBRANCH] = "\tj\tL%d",
[OEFUN] = "}",
- [OESTRUCT] = ")",
[OELOOP] = "\tb",
[OBLOOP] = "\td"
};
_AT_@ -111,11 +109,9 @@ void (*opcode[])(unsigned, void *) = {
[OLABEL] = emitsymid,
[ODEFAULT] = emitsymid,
[OCASE] = emitsymid,
- [OSTRUCT] = emitsymid,
[OJUMP] = emitsymid,
[OBRANCH] = emitsymid,
[OEFUN] = emittext,
- [OESTRUCT] = emittext,
[OELOOP] = emittext,
[OBLOOP] = emittext,
[OFUN] = emitfun,
diff --git a/cc1/decl.c b/cc1/decl.c
index bc5057f..04d40b1 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -342,7 +342,6 @@ structdcl(void)
if (tagtype->defined)
error("redefinition of struct/union '%s'", yytext);
tagtype->defined = 1;
- emit(OSTRUCT, tagsym);
while (!accept('}')) {
Type *base, *tp;
_AT_@ -378,7 +377,6 @@ structdcl(void)
expect(';');
}
- emit(OESTRUCT, NULL);
if ((n = bp - buff) != 0) {
siz = sizeof(Type *) * n;
tagtype->n.elem = n;
Received on Tue Aug 04 2015 - 22:15:13 CEST
This archive was generated by hypermail 2.3.0
: Tue Aug 04 2015 - 22:24:20 CEST