view python/irmach.py @ 269:5f8c04a8d26b

Towards better modularity
author Windel Bouwman
date Sun, 18 Aug 2013 17:43:18 +0200
parents 5ec7580976d9
children cdc76d183bcc
line wrap: on
line source


"""
  Abstract assembly language instructions
"""


class AbstractInstruction:
    """ Absract machine instruction """
    def __init__(self, assem, src=(), dst=(), jumps=()):
        self.assem = assem
        self.src = tuple(src)
        self.dst = tuple(dst)
        self.jumps = tuple(jumps)

    def __repr__(self):
        return self.assem + str(self.src) + str(self.dst)