class documentation
class Block: (source)
A block is a node in a directed graph. It has incoming and outgoing edges (jumps). Incoming jumps always jump to the first instruction of our bytecode, and outgoing jumps always jump from the last instruction. There are no jump instructions in the middle of a byte code block. A block implements most of the "sequence" interface, i.e., it can be used as if it was a Python list of bytecode instructions. Attributes: id: Block id code: A bytecode object (a list of instances of opcodes.Opcode). incoming: Incoming edges. These are blocks that jump to the first instruction in our code object. outgoing: Outgoing edges. These are the targets jumped to by the last instruction in our code object.
Method | __getitem__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | connect |
Add an outgoing edge. |
Instance Variable | code |
Undocumented |
Instance Variable | id |
Undocumented |
Instance Variable | incoming |
Undocumented |
Instance Variable | outgoing |
Undocumented |