1.1 --- a/common.py Sat Jan 21 18:22:20 2017 +0100
1.2 +++ b/common.py Sat Jan 21 22:11:04 2017 +0100
1.3 @@ -795,6 +795,21 @@
1.4 l.append(arg)
1.5 return l
1.6
1.7 +# Result classes.
1.8 +
1.9 +class InstructionSequence:
1.10 +
1.11 + "A generic sequence of instructions."
1.12 +
1.13 + def __init__(self, instructions):
1.14 + self.instructions = instructions
1.15 +
1.16 + def get_value_instruction(self):
1.17 + return self.instructions[-1]
1.18 +
1.19 + def get_init_instructions(self):
1.20 + return self.instructions[:-1]
1.21 +
1.22 # Dictionary utilities.
1.23
1.24 def init_item(d, key, fn):