Пример #1
0
 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,)
Пример #2
0
 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,)
Пример #3
0
 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
Пример #4
0
 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