def op_SETUP_LOOP(self, inst): assert self.blocks[inst.offset] is self.current_block loop = ir.Loop(inst.offset, exit=(inst.next + inst.arg)) self.syntax_blocks.append(loop)
def test_loop(self): a = ir.Loop(1, 3) b = ir.Loop(1, 3) c = ir.Loop(2, 3) d = ir.Loop(1, 4) self.check(a, same=[b], different=[c, d])