summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Böhm <bb@xnull.de>2009-07-03 09:52:32 +0200
committerBenedikt Böhm <bb@xnull.de>2009-07-03 09:52:32 +0200
commit4a38beb8137ecbe8b1cb31d0365cbb5f4307b785 (patch)
tree7cc4d328d5ef2c29299809d083f6c0dce40c93b6
parent615a4495af2d46ac1408cebff48a89deccb72a08 (diff)
downloadswppy-4a38beb8137ecbe8b1cb31d0365cbb5f4307b785.tar.gz
swppy-4a38beb8137ecbe8b1cb31d0365cbb5f4307b785.tar.xz
swppy-4a38beb8137ecbe8b1cb31d0365cbb5f4307b785.zip
rename BEQ to BEZ and make TACList iterable
-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__()