summaryrefslogtreecommitdiffstats
path: root/src/back
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/back/tac.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/back/tac.py b/src/back/tac.py
index 23ba1db..bff5944 100644
--- a/src/back/tac.py
+++ b/src/back/tac.py
@@ -34,7 +34,7 @@ Op.LE = Op("LE") # x = Z || N
Op.GE = Op("GE") # x = !N
Op.GT = Op("GT") # x = !Z && !N
-Op.BEQ = Op("BEQ") # if x goto y
+Op.BEZ = Op("BEZ") # if x == 0 goto y
Op.JMP = Op("JMP") # goto x
Op.PARAM = Op("PARAM") # param x
@@ -78,3 +78,6 @@ class TACList(object):
for i in range(len(self.__tac_list)):
res += "%04d: %s\n" % (i, repr(self.__tac_list[i]))
return res
+
+ def __iter__(self):
+ return self.__tac_list.__iter__()