summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lisc/lisc.h12
-rw-r--r--lisc/parse.c14
2 files changed, 12 insertions, 14 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 91d186a..30feac4 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -105,12 +105,6 @@ enum {
 };
 
 enum {
-	CXXX,
-	CWord,
-	CLong,
-};
-
-enum {
 	JXXX,
 	JRet,
 	JJmp,
@@ -160,8 +154,12 @@ struct Blk {
 };
 
 struct Sym {
+	enum {
+		SUndef,
+		SWord,
+		SLong,
+	} type;
 	char name[NString];
-	int class;
 	uint ndef, nuse;
 	uint cost;
 	uint spill;
diff --git a/lisc/parse.c b/lisc/parse.c
index 6335aa4..e1a1174 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -404,10 +404,10 @@ parseline(PState ps)
 	expect(TEq);
 	switch (next()) {
 	case TW:
-		sym[r.val].class = CWord;
+		sym[r.val].type = SWord;
 		break;
 	case TL:
-		sym[r.val].class = CLong;
+		sym[r.val].type = SLong;
 		break;
 	default:
 		err("class expected after =");
@@ -521,16 +521,16 @@ parsefn(FILE *f)
 static char *
 printref(Ref r, Fn *fn, FILE *f)
 {
-	static char *ctoa[] = {
-		[CXXX] = "?",
-		[CWord] = "w",
-		[CLong] = "l",
+	static char *ttoa[] = {
+		[SUndef] = "?",
+		[SWord] = "w",
+		[SLong] = "l",
 	};
 
 	switch (r.type) {
 	case RSym:
 		fprintf(f, "%%%s", fn->sym[r.val].name);
-		return ctoa[fn->sym[r.val].class];
+		return ttoa[fn->sym[r.val].type];
 	case RCons:
 		switch (fn->cons[r.val].type) {
 		case CAddr: