saladdais / python-goto Goto Github PK
View Code? Open in Web Editor NEWThis project forked from insignification/python-goto
A function decorator, that rewrites the bytecode, to enable goto in Python
License: The Unlicense
This project forked from insignification/python-goto
A function decorator, that rewrites the bytecode, to enable goto in Python
License: The Unlicense
Right now python-goto is segfaulting on Python 3.9 and above when trying to jump out of a block.
From https://docs.python.org/3.11/whatsnew/3.11.html#cpython-bytecode-changes:
Replaced JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH which performs the check but does not jump.
Replaced JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH which performs the check but does not jump.
Replaced JUMP_ABSOLUTE by the relative JUMP_BACKWARD.
Added JUMP_BACKWARD_NO_INTERRUPT, which is used in certain loops where it is undesirable to handle interrupts.
Replaced POP_JUMP_IF_TRUE and POP_JUMP_IF_FALSE by the relative POP_JUMP_FORWARD_IF_TRUE, POP_JUMP_BACKWARD_IF_TRUE, POP_JUMP_FORWARD_IF_FALSE and POP_JUMP_BACKWARD_IF_FALSE.
Added POP_JUMP_FORWARD_IF_NOT_NONE, POP_JUMP_BACKWARD_IF_NOT_NONE, POP_JUMP_FORWARD_IF_NONE and POP_JUMP_BACKWARD_IF_NONE opcodes to speed up conditional jumps.
Looks like the most important change is that absolute jumps no longer exist, and we have to use separate forward / backward relative jump types now. Will need separate codegen paths for 3.11+.
Have some code to handle relative jumps, but https://bugs.python.org/issue26647 will make things more complicated since we need to change the bytecode parser and serializer. May make sense to drop Python 2.7 support and look for newer parts of dis
that can do this dumping / parsing for us without requiring direct use of struct
to manipulate a buffer of bytecode...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.