Exemplo n.º 1
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Exemplo n.º 2
0
 def fn(flag):
     if flag:
         cls = cInt32
     else:
         cls = cString
     clitype = class2type(cls)
     return clitype.get_FullName()
Exemplo n.º 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)
Exemplo n.º 4
0
Arquivo: method.py Projeto: sota/pypy
 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)
Exemplo n.º 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)
Exemplo n.º 6
0
Arquivo: method.py Projeto: sota/pypy
 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)
Exemplo n.º 7
0
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Exemplo n.º 8
0
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname + '')
Exemplo n.º 9
0
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Exemplo n.º 10
0
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)
Exemplo n.º 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)
Exemplo n.º 12
0
Arquivo: method.py Projeto: sota/pypy
 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)
Exemplo n.º 13
0
Arquivo: runner.py Projeto: sota/pypy
 def get_self_clitype(self):
     return dotnet.class2type(self.selfclass)
Exemplo n.º 14
0
Arquivo: runner.py Projeto: sota/pypy
 def get_meth_info(self):
     clitype = dotnet.class2type(cpypyString)
     return clitype.GetMethod(self.methname+'')
Exemplo n.º 15
0
Arquivo: runner.py Projeto: sota/pypy
 def get_delegate_clitype(self):
     return dotnet.class2type(self.funcclass)
Exemplo n.º 16
0
Arquivo: runner.py Projeto: sota/pypy
 def get_clitype(self):
     return dotnet.class2type(self.ooclass)