コード例 #1
0
ファイル: compiler.py プロジェクト: dhavide/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)

    if config.DUMP_CFG:
        interp.cfa.dump()

    interp.interpret()

    if config.DEBUG or config.DUMP_IR:
        print(("IR DUMP: %s" % interp.bytecode.func_qualname).center(80, "-"))
        interp.dump()
        if interp.generator_info:
            print(
                ("GENERATOR INFO: %s" % interp.bytecode.func_qualname).center(
                    80, "-"))
            interp.dump_generator_info()

    expanded = macro.expand_macros(interp.blocks)

    if config.DUMP_IR and expanded:
        print(("MACRO-EXPANDED IR DUMP: %s" %
               interp.bytecode.func_qualname).center(80, "-"))
        interp.dump()

    return interp
コード例 #2
0
ファイル: compiler.py プロジェクト: genba/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)

    if config.DUMP_CFG:
        interp.cfa.dump()

    interp.interpret()

    if config.DEBUG:
        interp.dump()

    macro.expand_macros(interp.blocks)

    if config.DUMP_IR:
        interp.dump()

    return interp
コード例 #3
0
ファイル: compiler.py プロジェクト: genba/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)

    if config.DUMP_CFG:
        interp.cfa.dump()

    interp.interpret()

    if config.DEBUG:
        interp.dump()

    macro.expand_macros(interp.blocks)

    if config.DUMP_IR:
        interp.dump()

    return interp
コード例 #4
0
ファイル: compiler.py プロジェクト: MJJoyce/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)
    interp.interpret()

    if config.DEBUG:
        interp.dump()
        for syn in interp.syntax_info:
            print(syn)

    interp.verify()
    macro.expand_macros(interp.blocks)

    if config.DEBUG:
        interp.dump()
        for syn in interp.syntax_info:
            print(syn)

    return interp
コード例 #5
0
ファイル: compiler.py プロジェクト: jiaxu825/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)
    interp.interpret()

    if config.DEBUG:
        interp.dump()
        for syn in interp.syntax_info:
            print(syn)

    interp.verify()
    macro.expand_macros(interp.blocks)

    if config.DEBUG:
        interp.dump()
        for syn in interp.syntax_info:
            print(syn)

    return interp
コード例 #6
0
ファイル: compiler.py プロジェクト: laserson/numba
def translate_stage(bytecode):
    interp = interpreter.Interpreter(bytecode=bytecode)

    if config.DUMP_CFG:
        interp.cfa.dump()

    interp.interpret()

    if config.DEBUG or config.DUMP_IR:
        print(("IR DUMP: %s" % interp.bytecode.func_qualname).center(80, "-"))
        interp.dump()

    expanded = macro.expand_macros(interp.blocks)

    if config.DUMP_IR and expanded:
        print(("MACRO-EXPANDED IR DUMP: %s" % interp.bytecode.func_qualname)
            .center(80, "-"))
        interp.dump()

    return interp