Пример #1
0
 def tag(co, globals):
     if logger:
         try:
             f, clsname = function_cache[co]
         except KeyError:
             buildfncache(globals, function_cache)
             try:
                 f, clsname = function_cache[co]
             except KeyError:
                 clsname = ''  # give up
         modulename = globals.get('__name__', '?')
         if clsname:
             modulename += '.' + clsname
         logger.write('tag function: %s.%s' % (modulename, co.co_name), 1)
     tagged_codes.append((co, globals))
     _psyco.turbo_frame(co)
     _psyco.turbo_code(co)
Пример #2
0
def tag(co, globals):
    if logger:
        try:
            f, clsname = function_cache[co]
        except KeyError:
            buildfncache(globals, function_cache)
            try:
                f, clsname = function_cache[co]
            except KeyError:
                clsname = ''  # give up
        modulename = globals.get('__name__', '?')
        if clsname:
            modulename += '.' + clsname
        logger.write('tag function: %s.%s' % (modulename, co.co_name), 1)
    tagged_codes.append((co, globals))
    _psyco.turbo_frame(co)
    _psyco.turbo_code(co)