diff python/ir/instruction.py @ 221:848c4b15fd0b

pointers
author Windel Bouwman
date Mon, 08 Jul 2013 22:21:44 +0200
parents 1fa3e0050b49
children c3f1ce8b638f
line wrap: on
line diff
--- a/python/ir/instruction.py	Sat Jul 06 21:32:20 2013 +0200
+++ b/python/ir/instruction.py	Mon Jul 08 22:21:44 2013 +0200
@@ -140,7 +140,7 @@
       self.location = location
       self.addUse(self.location)
    def __repr__(self):
-      return '{1} = [{0}]'.format(self.location, self.value)
+      return '{} <= [{}]'.format(self.value, self.location)
 
 class Store(Instruction):
    def __init__(self, location, value):
@@ -152,7 +152,7 @@
       self.addUse(value)
       self.addUse(location)
    def __repr__(self):
-      return '[{0}] = {1}'.format(self.location, self.value)
+      return '[{}] <= {}'.format(self.location, self.value)
 
 # Branching:
 class Branch(Terminator):
@@ -174,6 +174,7 @@
       self.a = a
       assert type(a) is Value
       self.cond = cond
+      assert cond in ['==', '<', '>']
       self.b = b
       self.addUse(a)
       self.addUse(b)