-----------------------
New features:
- Add :meth:`ControlFlowGraph.get_block_index` method
API changes:
- Rename ``Block`` class to :class:`BasicBlock`
- Rename ``BytecodeBlocks`` class to :class:`ControlFlowGraph`
- Rename ``BaseInstr.op`` to :attr:`BaseInstr.opcode`
- Rename ``BaseBytecode.kw_only_argcount`` attribute to
:attr:`BaseBytecode.kwonlyargcount`, name closer to the Python code object
attribute (``co_kwonlyargcount``)
- :class:`Instr` constructor and its :meth:`~BaseInstr.set` method now
validates the argument type
- Add :class:`Compare` enum, used for ``COMPARE_OP`` argument of :class:`Instr`
- Remove *lineno* parameter from the :meth:`BaseInstr.set` method
- Add :class:`CellVar` and :class:`FreeVar` classes: instructions having
a cell or free variable now require a :class:`CellVar` or :class:`FreeVar`
instance rather than a simple string (``str``). This change is required
to handle correctly code with duplicated variable names in cell and free
variables.
- :class:`ControlFlowGraph`: remove undocumented ``to_concrete_bytecode()``
and ``to_code()`` methods
Bugfixes:
- Fix support of :class:`SetLineno`
Peephole optimizer:
- Better code for LOAD_CONST x n + BUILD_LIST + UNPACK_SEQUENCE: rewrite
LOAD_CONST in the reverse order instead of using ROT_TWO and ROT_THREE.
This optimization supports more than 3 items.
- Remove JUMP_ABSOLUTE pointing to the following code. It can occur
after dead code was removed.
- Remove NOP instructions
- Bugfix: catch IndexError when trying to get the next instruction.