|
@@ -184,6 +184,11 @@ class FlowInstruction(Instruction):
|
|
|
"""Gets a list of basic blocks targeted by this flow instruction."""
|
|
|
raise NotImplementedError()
|
|
|
|
|
|
+ def has_side_effects(self):
|
|
|
+ """Tells if this instruction has side-effects."""
|
|
|
+ # All flow-instructions have side-effects!
|
|
|
+ return True
|
|
|
+
|
|
|
class JumpFlow(FlowInstruction):
|
|
|
"""Represents a control flow instruction which jumps directly to a basic block."""
|
|
|
def __init__(self, branch):
|
|
@@ -407,6 +412,10 @@ class DeallocateRootNode(Value):
|
|
|
"""Gets all definitions and instructions on which this instruction depends."""
|
|
|
return [self.root_node]
|
|
|
|
|
|
+ def has_value(self):
|
|
|
+ """Tells if this value produces a result that is not None."""
|
|
|
+ return False
|
|
|
+
|
|
|
def has_side_effects(self):
|
|
|
"""Tells if this instruction has side-effects."""
|
|
|
return True
|