Open zrax opened 9 months ago
Added support for the following POP_JUMP_IF_NOT_NONE POP_JUMP_IF_NONE CALL_INTRINSIC_1 (only INTRINSIC_IMPORT_STAR)
EDIT: Fixed logging for unsupported intrinsic_1
I have no idea how to implement the other intrinsics, I found no obvious mapping to prior opcodes like with IMPORT_STAR and since I have no code to test it against either, this is all I can do rn. The script I wanted decompiled is successfully decompiled now, so thanks a lot for this project!
Warning: In my test file, it seems it's inverted - POP_JUMP_IF_NOT_NONE_A
needed to be come if xxx is None:
for the decompiled behaviour to match the original. No occurences of POP_JUMP_IF_NONE_A to double-check sadly. Not sure if this is a general error, cpython seems to treat POP_JUMP_IF_NOT_NONE_A as expected, and the opcodes also match the ones found here.
This will need proper verification.
pycdc crashes for some pyc files when parsing JUMP_BACKWARD_A(140) in python 3.11, could you examine what the error is?
JUMP_BACKWARD is still not in main branch, you could try to play with this PR: https://github.com/zrax/pycdc/pull/472
JUMP_BACKWARD is still not in main branch, you could try to play with this PR: #472
Thanks for the pr!
Anything new about LOAD_FAST_AND_CLEAR?
JUMP_BACKWARD
JUMP_BACKWARD_A与JUMP_BACKWARD是否有区别
POP_JUMP_IF_NONE
合并后依旧报错Unsupported opcode: POP_JUMP_IF_NONE (239)
Tasks
INTERPRETER_EXIT
END_FOR
END_SEND
RESERVED
BINARY_SLICE
STORE_SLICE
CLEANUP_THROW
POP_JUMP_IF_FALSE
POP_JUMP_IF_TRUE
RETURN_CONST
LOAD_FAST_CHECK
POP_JUMP_IF_NOT_NONE
POP_JUMP_IF_NONE
LOAD_SUPER_ATTR
LOAD_FAST_AND_CLEAR
YIELD_VALUE
CALL_INTRINSIC_1
CALL_INTRINSIC_2
LOAD_FROM_DICT_OR_GLOBALS
LOAD_FROM_DICT_OR_DEREF
INSTRUMENTED_LOAD_SUPER_ATTR
INSTRUMENTED_POP_JUMP_IF_NONE
INSTRUMENTED_POP_JUMP_IF_NOT_NONE
INSTRUMENTED_RESUME
INSTRUMENTED_CALL
INSTRUMENTED_RETURN_VALUE
INSTRUMENTED_YIELD_VALUE
INSTRUMENTED_CALL_FUNCTION_EX
INSTRUMENTED_JUMP_FORWARD
INSTRUMENTED_JUMP_BACKWARD
INSTRUMENTED_RETURN_CONST
INSTRUMENTED_FOR_ITER
INSTRUMENTED_POP_JUMP_IF_FALSE
INSTRUMENTED_POP_JUMP_IF_TRUE
INSTRUMENTED_END_FOR
INSTRUMENTED_END_SEND
INSTRUMENTED_INSTRUCTION
INSTRUMENTED_LINE