def __str__(self) -> str: return short_name(self.name)
def short_name(self) -> str: return short_name(self.name)
def visit_dec_ref(self, op: DecRef) -> str: s = self.format('%sdec_ref %r', 'x' if op.is_xdec else '', op.src) # TODO: Remove bool check (it's unboxed) if is_bool_rprimitive(op.src.type) or is_int_rprimitive(op.src.type): s += ' :: {}'.format(short_name(op.src.type.name)) return s
def to_str(self, env: Environment) -> str: s = env.format('%sdec_ref %r', 'x' if self.is_xdec else '', self.src) if is_bool_rprimitive(self.src.type) or is_int_rprimitive( self.src.type): s += ' :: {}'.format(short_name(self.src.type.name)) return s
def visit_inc_ref(self, op: IncRef) -> str: s = self.format('inc_ref %r', op.src) # TODO: Remove bool check (it's unboxed) if is_bool_rprimitive(op.src.type) or is_int_rprimitive(op.src.type): s += ' :: {}'.format(short_name(op.src.type.name)) return s