Ejemplo n.º 1
0
def inject_phis(func):
    '''Given a Python function, return a bytecode flow object that has
    been transformed by a fresh PhiInjector instance.'''
    import byte_control
    argcount = byte_control.opcode_util.get_code_object(func).co_argcount
    cfg = byte_control.build_cfg(func)
    return PhiInjector().visit_cfg(cfg, argcount)
Ejemplo n.º 2
0
def inject_phis (func):
    '''Given a Python function, return a bytecode flow object that has
    been transformed by a fresh PhiInjector instance.'''
    import byte_control
    argcount = byte_control.opcode_util.get_code_object(func).co_argcount
    cfg = byte_control.build_cfg(func)
    return PhiInjector().visit_cfg(cfg, argcount)
Ejemplo n.º 3
0
def build_flow (func):
    '''Given a Python function, return a bytecode flow tree for that
    function.'''
    import byte_control
    cfg = byte_control.build_cfg(func)
    return BytecodeFlowBuilder().visit_cfg(cfg)
Ejemplo n.º 4
0
def build_flow(func):
    '''Given a Python function, return a bytecode flow tree for that
    function.'''
    import byte_control
    cfg = byte_control.build_cfg(func)
    return BytecodeFlowBuilder().visit_cfg(cfg)
Ejemplo n.º 5
0
def inject_phis (func):
    import byte_control
    argcount = byte_control.opcode_util.get_code_object(func).co_argcount
    cfg = byte_control.build_cfg(func)
    return PhiInjector().visit_cfg(cfg, argcount)