Open wilson0x4d opened 3 months ago
indeed, i overlooked the EXTENDED_ARG
handling.
the update i've pushed instead relies on bc_next
to pass bytecode
back up to the caller, this seems cleaner (doesn't couple the code to code()->value()
) and compensates for EXTENDED_ARG
correctly. this does leave the position printed off by a few bytes (when EXTENDED_ARG
), but the bytecode value becomes accurate (which is what I was really looking for in the output) and even being a few bytes off at least gets someone who understands the bytecode into the right area of the image (where they would see EXTENDED_ARG
and could mentally compensate.)
i also updated the disasm code with a similar change (to include the offending bytecode in the output.)
opcode
was incorrectly clamped causing misleading output.modified output with additional info about offending bytecode and position so end-user submissions can become more informative.