pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

Handle Python 3.10 unsupported opcodes in AST builder

Open Dere3046 opened this issue 5 months ago • 0 comments

Adds handler cases for 7 Python 3.10 opcodes that were previously unhandled, preventing pycdc from decompiling any module containing *args/**kwargs calls, extended unpack, dict merge, assert, or try/except exception matching.

CALL_FUNCTION_EX produces ASTCall with setVar/setKW for *args/**kwargs UNPACK_EX uses the existing unpack mechanism like UNPACK_SEQUENCE DICT_MERGE stack balancing for {**d} in dict displays DICT_UPDATE stack balancing for dict accumulator updates LOAD_ASSERTION_ERROR stack balancing for assert statements LIST_TO_TUPLE stack balancing for list-to-tuple conversion JUMP_IF_NOT_EXC_MATCH stack balancing for except type matching

MAP_ADD and SET_ADD intentionally not handled — their comprehension AST reconstruction triggers block management issues when used with conditional comprehension expressions.

4 new tests added: test_call_starargs_310, test_unpack_ex_310, test_assert_310, test_dict_merge_310. All 84 upstream tests pass.

Dere3046 avatar Jun 10 '26 12:06 Dere3046