Exemple #1
0
def build_cfg (func):
    '''Given a Python function, create a bytecode flow, visit the flow
    object, and return a control flow graph.'''
    import byte_flow
    return ControlFlowBuilder().visit(
        byte_flow.build_flow(func),
        opcode_util.get_code_object(func).co_argcount)
Exemple #2
0
def build_cfg(func):
    '''Given a Python function, create a bytecode flow, visit the flow
    object, and return a control flow graph.'''
    import byte_flow
    return ControlFlowBuilder().visit(
        byte_flow.build_flow(func),
        opcode_util.get_code_object(func).co_argcount)
Exemple #3
0
def build_cfg (func):
    import byte_flow
    return ControlFlowBuilder().visit(
        byte_flow.build_flow(func),
        opcode_util.get_code_object(func).co_argcount)