def unary_op(self, lreg: Value, expr_op: str, line: int) -> Value: ops = unary_ops.get(expr_op, []) target = self.matching_primitive_op(ops, [lreg], line) assert target, 'Unsupported unary operation: %s' % expr_op return target
def unary_op(self, lreg: Value, expr_op: str, line: int) -> Value: call_c_ops_candidates = c_unary_ops.get(expr_op, []) target = self.matching_call_c(call_c_ops_candidates, [lreg], line) if target: return target ops = unary_ops.get(expr_op, []) target = self.matching_primitive_op(ops, [lreg], line) assert target, 'Unsupported unary operation: %s' % expr_op return target