llpython.byte_flow

class llpython.byte_flow.BytecodeFlowBuilder(*args, **kws)

Transforms a bytecode vector into a bytecode “flow tree”.

The flow tree is a Python dictionary, described loosely by the following set of productions:

  • flow_tree := { blocks * }

  • blocks := block_index : [ bytecode_tree * ]

  • bytecode_tree := ( opcode_index , opcode ,

    opname , arg , [ bytecode_tree * ] )

The primary purpose of this transformation is to simulate the value stack, removing it and any stack-specific opcodes.

llpython.byte_flow.build_flow(func)

Given a Python function, return a bytecode flow tree for that function.

Previous topic

llpython.byte_control

Next topic

llpython.byte_translator

This Page