Open kc611 opened 1 year ago
The additional bit is that the Python bytecode itself can be stored as metadata on the PythonByteCode blocks. This will allow those classes to be removed entirely.
I think that the ideal API would be:
scfg = SCFG.from_python_function(python_func)
Or:
scfg = SCFG(python_func)
Also, this means, the ByteFlowRenderer
can be removed too because PythonBytecodeBlocks will have the bytecode embedded and as such contain all the information they need to supply to be rendered.
As titled,
The
ByteFlow
andFlowInfo
classes can be removed to reduce complexity. All of the methods of the classes can either be made part of theSCFG
object or can be made into a function rather than a part of the class.