1.1 --- a/micropython/code.py Sun Aug 21 21:38:56 2011 +0200
1.2 +++ b/micropython/code.py Sun Aug 21 23:59:52 2011 +0200
1.3 @@ -80,11 +80,20 @@
1.4
1.5 return Block()
1.6
1.7 - def set_block(self, block):
1.8 + def get_block(self):
1.9 +
1.10 + "Return the current block."
1.11 +
1.12 + return self.blocks[-1]
1.13
1.14 - "Add the given 'block' to the unit's list of blocks."
1.15 + def set_block(self, block, preceding=None):
1.16
1.17 - self.optimiser.reset()
1.18 + """
1.19 + Add the given 'block' to the unit's list of blocks, noting any active
1.20 + value information from 'preceding' blocks on the new block.
1.21 + """
1.22 +
1.23 + self.optimiser.reset(block, preceding)
1.24 self.blocks.append(block)
1.25
1.26 def get_loop_blocks(self):