Beispiel #1
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Beispiel #2
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Beispiel #3
0
 def compute_types(self):
     box2classes = {}  # box --> [ootype.Class]
     self._collect_types(self.cliloop.operations, box2classes)
     for box, classes in box2classes.iteritems():
         cls = classes[0]
         for cls2 in classes[1:]:
             if ootype.subclassof(cls, cls2):
                 cls = cls2
             else:
                 assert ootype.subclassof(cls2, cls)
         self.box2type[box] = dotnet.class2type(cls)
Beispiel #4
0
 def compute_types(self):
     box2classes = {}  # box --> [ootype.Class]
     self._collect_types(self.cliloop.operations, box2classes)
     for box, classes in box2classes.iteritems():
         cls = classes[0]
         for cls2 in classes[1:]:
             if ootype.subclassof(cls, cls2):
                 cls = cls2
             else:
                 assert ootype.subclassof(cls2, cls)
         self.box2type[box] = dotnet.class2type(cls)
Beispiel #5
0
 def emit_op_guard_exception(self, op):
     il_label = self.newbranch(op)
     classbox = op.args[0]
     assert isinstance(classbox, ConstObj)
     oocls = classbox.getref(ootype.Class)
     clitype = dotnet.class2type(oocls)
     self.av_inputargs.load(self)
     self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
     self.il.Emit(OpCodes.Isinst, clitype)
     self.il.Emit(OpCodes.Brfalse, il_label)
     # the guard succeeded, store the result
     self.av_inputargs.load(self)
     self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
     self.store_result(op)
Beispiel #6
0
 def emit_op_guard_exception(self, op):
     il_label = self.newbranch(op)
     classbox = op.args[0]
     assert isinstance(classbox, ConstObj)
     oocls = classbox.getref(ootype.Class)
     clitype = dotnet.class2type(oocls)
     self.av_inputargs.load(self)
     self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
     self.il.Emit(OpCodes.Isinst, clitype)
     self.il.Emit(OpCodes.Brfalse, il_label)
     # the guard succeeded, store the result
     self.av_inputargs.load(self)
     self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
     self.store_result(op)
Beispiel #7
0
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Beispiel #8
0
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname + '')
Beispiel #9
0
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Beispiel #10
0
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)
Beispiel #11
0
 def _get_meth_wrapper(self):
     restype = dotnet.class2type(cVoid)
     args = self._get_args_array([dotnet.typeof(InputArgs)])
     return get_method_wrapper(self.name, restype, args)
Beispiel #12
0
 def _get_meth_wrapper(self):
     restype = dotnet.class2type(cVoid)
     args = self._get_args_array([dotnet.typeof(InputArgs)])
     return get_method_wrapper(self.name, restype, args)
Beispiel #13
0
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Beispiel #14
0
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname+'')
Beispiel #15
0
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Beispiel #16
0
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)