示例#1
0
 def _create_complex_const(self, value):
     if isinstance(value, ootype._view) and isinstance(
             value._inst, ootype._record):
         self.db.cts.lltype_to_cts(
             value._inst._TYPE)  # record the type of the record
         return self.record_const(value._inst)
     else:
         return BaseConstantGenerator._create_complex_const(self, value)
示例#2
0
文件: constant.py 项目: sota/pypy
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.num_constants = 0
     self.ccs = []
示例#3
0
文件: constant.py 项目: sota/pypy
 def _get_key_for_const(self, value):
     if isinstance(value, ootype._view) and isinstance(value._inst, ootype._record):
         return value._inst
     return BaseConstantGenerator._get_key_for_const(self, value)
示例#4
0
文件: constant.py 项目: sota/pypy
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.cts = db.genoo.TypeSystem(db)
示例#5
0
文件: constant.py 项目: sota/pypy
 def _create_complex_const(self, value):
     if isinstance(value, ootype._view) and isinstance(value._inst, ootype._record):
         self.db.cts.lltype_to_cts(value._inst._TYPE) # record the type of the record
         return self.record_const(value._inst)
     else:
         return BaseConstantGenerator._create_complex_const(self, value)
示例#6
0
 def _get_key_for_const(self, value):
     if isinstance(value, ootype._view) and isinstance(
             value._inst, ootype._record):
         return value._inst
     return BaseConstantGenerator._get_key_for_const(self, value)
示例#7
0
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.cts = db.genoo.TypeSystem(db)
示例#8
0
文件: constant.py 项目: sota/pypy-old
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.num_constants = 0
     self.ccs = []