comparison python/target/basetarget.py @ 306:b145f8e6050b

Start on c3 rewrite
author Windel Bouwman
date Mon, 09 Dec 2013 19:00:21 +0100
parents 534b94b40aa8
children 6f4753202b9a
comparison
equal deleted inserted replaced
305:0615b5308710 306:b145f8e6050b
139 def __init__(self, name, desc=''): 139 def __init__(self, name, desc=''):
140 self.name = name 140 self.name = name
141 self.desc = desc 141 self.desc = desc
142 self.registers = [] 142 self.registers = []
143 self.instructions = [] 143 self.instructions = []
144 self.byte_sizes = {'int':4} # For front end!
144 145
145 def instruction(self, cls): 146 def instruction(self, cls):
146 """ Decorator function that registers an instruction to this target """ 147 """ Decorator function that registers an instruction to this target """
147 self.addInstruction(cls) 148 self.addInstruction(cls)
148 return cls 149 return cls