-
Notifications
You must be signed in to change notification settings - Fork 655
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
Support for JUMP_BACKWARD #472
base: master
Are you sure you want to change the base?
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:
|
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