view python/irmach.py @ 271:cf7d5fb7d9c8

Reorganization
author Windel Bouwman
date Tue, 20 Aug 2013 18:56:02 +0200
parents cdc76d183bcc
children ea93e0a7a31e
line wrap: on
line source


"""
  Abstract assembly language instructions.

  This is the second intermediate representation.
  
  Instructions are selected and scheduled at this stage.
"""


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)