def expr(self, v, special_case_void=True): if isinstance(v, Variable): if self.lltypemap(v) is Void and special_case_void: return '/* nothing */' else: return LOCALVAR % v.name elif isinstance(v, Constant): value = llvalue_from_constant(v) if value is None and not special_case_void: return 'nothing' else: return self.db.get(value) else: raise TypeError("expr(%r)" % (v,))
def expr(self, v, special_case_void=True): if isinstance(v, Variable): if self.lltypemap(v) is Void and special_case_void: return '/* nothing */' else: return LOCALVAR % v.name elif isinstance(v, Constant): value = llvalue_from_constant(v) if value is None and not special_case_void: return 'nothing' else: return self.db.get(value) else: raise TypeError("expr(%r)" % (v, ))
def allconstantvalues(self): for c in self.vars: if isinstance(c, Constant): yield llvalue_from_constant(c) for llvalue in self.more_ll_values: yield llvalue