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)
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)
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)
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)
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)