summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-03 12:27:10 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:27 -0400
commit7c92b5a0c44b8faf9e5425b17caa4610da0e6902 (patch)
treeabc03f44b65158e69551644bdd43100327d63e45
parentfc814c5873d6ffd76130da015520b07c8f8f3450 (diff)
downloadroux-7c92b5a0c44b8faf9e5425b17caa4610da0e6902.tar.gz
trivial bugs
-rw-r--r--lisc/parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisc/parse.c b/lisc/parse.c
index 4e6ec85..7cd3d7a 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -217,6 +217,7 @@ varref(char *v)
 	sym[t].type = STemp;
 	strcpy(sym[t].name, v);
 	sym[t].blk = 0;
+	ntemp++;
 	return TEMP(t);
 }
 
@@ -402,7 +403,7 @@ parseline(PState ps)
 		curi->l = args[0];
 		curi->r = args[1];
 		curi++;
-		return PPhi;
+		return PIns;
 	} else {
 		if (curp - phis >= NPhis)
 			err("too many phis in block");
@@ -410,7 +411,7 @@ parseline(PState ps)
 		memcpy(curp->args, args, i * sizeof(Ref));
 		curp->na = i;
 		curp++;
-		return PIns;
+		return PPhi;
 	}
 }