Ejemplo n.º 1
0
 def get_exception(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         exc_obj = dotnet.cast_from_native_object(exc_value)
         exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
         cls = ootype.classof(exc_value)
         return ootype.cast_to_object(cls)
     return ootype.cast_to_object(ootype.nullruntimeclass)
Ejemplo n.º 2
0
Archivo: runner.py Proyecto: sota/pypy
 def get_exception(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         exc_obj = dotnet.cast_from_native_object(exc_value)
         exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
         cls = ootype.classof(exc_value)
         return ootype.cast_to_object(cls)
     return ootype.cast_to_object(ootype.nullruntimeclass)
Ejemplo n.º 3
0
def ll_inst_type(obj):
    if obj:
        return ootype.classof(obj)
    else:
        # type(None) -> NULL  (for now)
        return ootype.nullruntimeclass
Ejemplo n.º 4
0
def ll_isinstance(inst, class_):
    c1 = ootype.classof(inst)
    return ootype.subclassof(c1, class_)
Ejemplo n.º 5
0
Archivo: rclass.py Proyecto: sota/pypy
def ll_inst_type(obj):
    if obj:
        return ootype.classof(obj)
    else:
        # type(None) -> NULL  (for now)
        return ootype.nullruntimeclass
Ejemplo n.º 6
0
def op_classof(inst):
    return ootype.classof(inst)
Ejemplo n.º 7
0
 def get_zero_division_error(self):
     exc_type = ootype.cast_to_object(ootype.classof(self.ll_zero_exc))
     exc_value = ootype.cast_to_object(self.ll_zero_exc)
     return exc_type, exc_value
Ejemplo n.º 8
0
 def get_overflow_error(self):
     exc_type = ootype.cast_to_object(ootype.classof(self.ll_ovf_exc))
     exc_value = ootype.cast_to_object(self.ll_ovf_exc)
     return exc_type, exc_value
Ejemplo n.º 9
0
Archivo: runner.py Proyecto: sota/pypy
 def get_zero_division_error(self):
     exc_type = ootype.cast_to_object(ootype.classof(self.ll_zero_exc))
     exc_value = ootype.cast_to_object(self.ll_zero_exc)
     return exc_type, exc_value
Ejemplo n.º 10
0
Archivo: runner.py Proyecto: sota/pypy
 def get_overflow_error(self):
     exc_type = ootype.cast_to_object(ootype.classof(self.ll_ovf_exc))
     exc_value = ootype.cast_to_object(self.ll_ovf_exc)
     return exc_type, exc_value
Ejemplo n.º 11
0
def op_classof(inst):
    return ootype.classof(inst)