Ejemplo n.º 1
0
 def _create_complex_const(self, value):
     from pypy.translator.cli.dotnet import _fieldinfo
     if isinstance(value, _fieldinfo):
         uniq = self.db.unique()
         return CLIFieldInfoConst(self.db, value.llvalue, uniq)
     else:
         return BaseConstantGenerator._create_complex_const(self, value)
Ejemplo n.º 2
0
 def _create_complex_const(self, value):
     from pypy.translator.cli.dotnet import _fieldinfo
     if isinstance(value, _fieldinfo):
         uniq = self.db.unique()
         return CLIFieldInfoConst(self.db, value.llvalue, uniq)
     else:
         return BaseConstantGenerator._create_complex_const(self, value)
Ejemplo n.º 3
0
    def _create_complex_const(self, value):
        from pypy.translator.cli.dotnet import _fieldinfo

        if isinstance(value, _fieldinfo):
            uniq = self.db.unique()
            return CLIFieldInfoConst(self.db, value.llvalue, uniq)
        elif 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)
Ejemplo n.º 4
0
    def _create_complex_const(self, value):
        from pypy.translator.cli.dotnet import _fieldinfo

        if isinstance(value, _fieldinfo):
            uniq = self.db.unique()
            return CLIFieldInfoConst(self.db, value.llvalue, uniq)
        elif 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)
Ejemplo n.º 5
0
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.num_constants = 0
     self.ccs = []
Ejemplo n.º 6
0
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.cts = db.genoo.TypeSystem(db)
Ejemplo n.º 7
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)
Ejemplo n.º 8
0
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.cts = db.genoo.TypeSystem(db)
Ejemplo n.º 9
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)
Ejemplo n.º 10
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)
Ejemplo n.º 11
0
 def __init__(self, db):
     BaseConstantGenerator.__init__(self, db)
     self.num_constants = 0
     self.ccs = []