Giter Club home page Giter Club logo

python-goto's People

Contributors

dsblank avatar graingert avatar insignification avatar saladdais avatar snoack avatar spacewander avatar

python-goto's Issues

Support bytecode changes in CPython 3.11

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.