(tapename, res, regs)
| 16 | thread_regs = collections.defaultdict(lambda: 0) |
| 17 | |
| 18 | def process(tapename, res, regs): |
| 19 | for inst in Tape.read_instructions(tapename): |
| 20 | t = inst.type |
| 21 | if issubclass(t, DirectMemoryInstruction): |
| 22 | res[type(inst.args[0])] = max(inst.args[1].i + inst.size, |
| 23 | res[type(inst.args[0])]) + 1 |
| 24 | for arg in inst.args: |
| 25 | if isinstance(arg, RegisterArgFormat): |
| 26 | regs[type(arg)] = max(regs[type(arg)], arg.i + inst.size) |
| 27 | |
| 28 | try: |
| 29 | tapes = Program.read_tapes(sys.argv[1]) |
no test coverage detected