|
@@ -811,6 +811,11 @@ class LoweringState(object):
|
|
|
lhs, rhs = self.use_definition(value.lhs), self.use_definition(value.rhs)
|
|
|
return tree_ir.BinaryInstruction(lhs, value.operator, rhs)
|
|
|
|
|
|
+ def lower_unary(self, value):
|
|
|
+ """Lowers a 'unary' value."""
|
|
|
+ operand, = self.use_definition(value.operand)
|
|
|
+ return tree_ir.UnaryInstruction(value.operator, operand)
|
|
|
+
|
|
|
def lower_direct_call(self, value):
|
|
|
"""Lowers a direct function call."""
|
|
|
calling_convention = value.calling_convention
|
|
@@ -956,6 +961,7 @@ class LoweringState(object):
|
|
|
cfg_ir.CreateNode : lower_create_node,
|
|
|
cfg_ir.CreateEdge : lower_create_edge,
|
|
|
cfg_ir.Binary : lower_binary,
|
|
|
+ cfg_ir.Unary : lower_unary,
|
|
|
cfg_ir.DirectFunctionCall : lower_direct_call,
|
|
|
cfg_ir.IndirectFunctionCall : lower_indirect_call,
|
|
|
cfg_ir.JumpFlow : lower_jump,
|