def rtype_getattr(self, hop): s_attr = hop.args_s[1] if s_attr.is_constant() and isinstance(s_attr.const, str): attr = s_attr.const s_obj = hop.args_s[0] v_array, vattr = hop.inputargs(self, Void) getter = getattr(self, 'get_' + attr, None) if getter: return getter(hop, v_array) return Repr.rtype_getattr(self, hop)
def rtype_getattr(self, hop): s_attr = hop.args_s[1] if s_attr.is_constant() and isinstance(s_attr.const, str): attr = s_attr.const s_obj = hop.args_s[0] v_array, vattr = hop.inputargs(self, Void) getter = getattr(self, 'get_'+attr, None) if getter: return getter(hop, v_array) return Repr.rtype_getattr(self, hop)
def convert_const(self, value): if value is None: return ootype.null(self.lowleveltype) else: return Repr.convert_const(self, value)