Пример #1
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Пример #2
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #7
0
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Пример #8
0
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname + '')
Пример #9
0
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Пример #10
0
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)
Пример #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)
Пример #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)
Пример #13
0
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Пример #14
0
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname+'')
Пример #15
0
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Пример #16
0
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)