-
Notifications
You must be signed in to change notification settings - Fork 732
Support for JUMP_BACKWARD #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@zrax Do you think it makes sense to add support into this PR for the next missed operand? PS the test was done on Python 3.12 |
I compiled with pycdc, and it doesn't work if you just add the line
python 3.11: (didn't work, because
python 3.8: (still didn't work, but thats because of list comprehension and lambda together is not supported yet as you can see)
the bytecode is almost exactly the same, only difference is |
do you mean this opcode has diff meaning in diff Python versions? |
I mean that the bytecode of this source code
between version 3.10 and 3.11 is this:
3.11:
if you look, there is not very much difference in the bytecode, |
i would suggest to add, after the lines:
to add this lines, for it to work:
then this way it is exactly like the jump absolute, and it will work, then you can compile the test file "test_for_loop_py3.8.py" for version 3.11 and add it to the compiled folder, i saw there is return None in the end, so maybe also get the whole code inside a function and remove the return statement, |
Proposal:
|
@greenozon can we have this pr please be reopened? This seems to have not made to master yet. |
Need to make sure it works 100% for diff python versions zoo... |
Yeah sure, do let me know what is required. This seems to work okay for my pyc file with python 3.12. |
can you sent me release pycdc?,thanks |
|
I don't know how to compile programs. None of the ones downloaded from the Internet can be used. They keep showing the message "jump backward" |
According to this article the JUMP_BACKWARD was a replacement for the same opcode JUMP_ABSOLUTE
https://bugs.python.org/issue47120
Test Case
pycdas for TC
before
after