예제 #1
0
파일: lowering.py 프로젝트: MJJoyce/numba
def describe_function(interp, typemap, restype, calltypes, mangler):
    fname, pymod, doc, args, kws = _describe(interp)
    native = True
    sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
    fd = FunctionDescriptor(native, pymod, fname, doc, sortedblocks,
                            typemap, restype, calltypes, args, kws, mangler)
    return fd
예제 #2
0
def describe_function(interp, typemap, restype, calltypes):
    fname, pymod, doc, args, kws = _describe(interp)
    native = True
    sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
    fd = FunctionDescriptor(native, pymod, fname, doc, sortedblocks, typemap,
                            restype, calltypes, args, kws)
    return fd
예제 #3
0
파일: bytecode.py 프로젝트: ASPP/numba
    def dump(self):
        def label_marker(i):
            if i[1].offset in self.labels:
                return '>'
            else:
                return ' '

        return '\n'.join('%s %10d\t%s' % ((label_marker(i),) + i)
                         for i in utils.dict_iteritems(self.table))
예제 #4
0
파일: lowering.py 프로젝트: B-Rich/numba
 def _from_python_function(cls, interp, typemap, restype, calltypes,
                           native, mangler=None):
     (qualname, unique_name, modname, doc, args, kws, func_globals
      )= cls._get_function_info(interp)
     sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
     self = cls(native, modname, qualname, unique_name, doc,
                sortedblocks, typemap, restype, calltypes,
                args, kws, mangler=mangler, globals=func_globals)
     return self
예제 #5
0
    def dump(self):
        def label_marker(i):
            if i[1].offset in self.labels:
                return '>'
            else:
                return ' '

        return '\n'.join('%s %10d\t%s' % ((label_marker(i), ) + i)
                         for i in utils.dict_iteritems(self.table))
예제 #6
0
파일: lowering.py 프로젝트: MJJoyce/numba
def describe_pyfunction(interp):
    fname, pymod, doc, args, kws = _describe(interp)
    defdict = lambda: defaultdict(lambda: types.pyobject)
    typemap = defdict()
    restype = types.pyobject
    calltypes = defdict()
    native = False
    sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
    fd = FunctionDescriptor(native, pymod, fname, doc, sortedblocks,
                            typemap, restype,  calltypes, args, kws)
    return fd
예제 #7
0
def describe_pyfunction(interp):
    fname, pymod, doc, args, kws = _describe(interp)
    defdict = lambda: defaultdict(lambda: types.pyobject)
    typemap = defdict()
    restype = types.pyobject
    calltypes = defdict()
    native = False
    sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
    fd = FunctionDescriptor(native, pymod, fname, doc, sortedblocks, typemap,
                            restype, calltypes, args, kws)
    return fd
예제 #8
0
 def _from_python_function(cls,
                           interp,
                           typemap,
                           restype,
                           calltypes,
                           native,
                           mangler=None):
     (qualname, unique_name, modname, doc, args, kws,
      func_globals) = cls._get_function_info(interp)
     sortedblocks = utils.SortedMap(utils.dict_iteritems(interp.blocks))
     self = cls(native,
                modname,
                qualname,
                unique_name,
                doc,
                sortedblocks,
                typemap,
                restype,
                calltypes,
                args,
                kws,
                mangler=mangler,
                globals=func_globals)
     return self
예제 #9
0
 def insert_class(self, cls, attrs):
     clsty = types.Object(cls)
     for name, vtype in utils.dict_iteritems(attrs):
         imp = python_attr_impl(clsty, name, vtype)
         self.attrs[imp.key] = imp
예제 #10
0
 def inspect_types(self):
     for ver, res in utils.dict_iteritems(self.overloads):
         print("%s %s" % (self.py_func.__name__, ver))
         print('-' * 80)
         print(res.type_annotation)
         print('=' * 80)
예제 #11
0
파일: irpasses.py 프로젝트: rayleyva/numba
 def run(self):
     for blkid, blk in utils.dict_iteritems(self.interp.blocks):
         self.run_block(blk)
예제 #12
0
 def run(self):
     for blkid, blk in utils.dict_iteritems(self.interp.blocks):
         self.run_block(blk)
예제 #13
0
 def inspect_types(self):
     for ver, res in utils.dict_iteritems(self.overloads):
         print("%s %s" % (self.py_func.__name__, ver))
         print('-' * 80)
         print(res.type_annotation)
         print('=' * 80)