|
@@ -72,12 +72,8 @@ class LoopBlock(object):
|
|
|
|
|
|
def lower(self, state):
|
|
def lower(self, state):
|
|
"""Lowers this 'loop' block to a tree."""
|
|
"""Lowers this 'loop' block to a tree."""
|
|
- inner = tree_ir.LoopInstruction(
|
|
|
|
- tree_ir.create_block(
|
|
|
|
- self.inner.lower(state),
|
|
|
|
- tree_ir.BreakInstruction()))
|
|
|
|
return tree_ir.create_block(
|
|
return tree_ir.create_block(
|
|
- inner,
|
|
|
|
|
|
+ tree_ir.LoopInstruction(self.inner.lower(state)),
|
|
self.next_block.lower(state))
|
|
self.next_block.lower(state))
|
|
|
|
|
|
class MultipleBlock(object):
|
|
class MultipleBlock(object):
|
|
@@ -112,12 +108,8 @@ class MultipleLoopBlock(MultipleBlock):
|
|
|
|
|
|
def lower(self, state):
|
|
def lower(self, state):
|
|
"""Lowers this 'multiple' block to a tree."""
|
|
"""Lowers this 'multiple' block to a tree."""
|
|
- inner = tree_ir.LoopInstruction(
|
|
|
|
- tree_ir.create_block(
|
|
|
|
- self.lower_handled_blocks(state),
|
|
|
|
- tree_ir.BreakInstruction()))
|
|
|
|
return tree_ir.create_block(
|
|
return tree_ir.create_block(
|
|
- inner,
|
|
|
|
|
|
+ tree_ir.LoopInstruction(self.lower_handled_blocks(state)),
|
|
self.next_block.lower(state))
|
|
self.next_block.lower(state))
|
|
|
|
|
|
class ContinueFlow(cfg_ir.FlowInstruction):
|
|
class ContinueFlow(cfg_ir.FlowInstruction):
|