예제 #1
0
파일: constant.py 프로젝트: chyyuu/pygirl
 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)
예제 #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)
예제 #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)
예제 #4
0
파일: constant.py 프로젝트: griels/pypy-sc
    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)
예제 #5
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)