A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/078103.html below:

[Python-Dev] Two questions about jump opcodes

[Python-Dev] Two questions about jump opcodes [Python-Dev] Two questions about jump opcodesskip at pobox.com skip at pobox.com
Sat Mar 22 23:58:29 CET 2008
    Antoine> - Why are there both relative and absolute jump instructions?

The best place to search for the reasons behind this is Python/compile.c.
(JUMP_ABSOLUTE can jump backwards.)  There have been lots and lots of
changes to the Python virtual machine the past few years.  When trying to
understand the basic concepts it might be best to check out a very old
version of the code from Subversion (1.5.2, 2.0, 2.1, etc).  Those versions
have many fewer optimizations, so it's likely that compile.c and ceval.c
will be more readable.  (My full understanding of the virtual machine
probably ended with 1.5.2.)  That should give you a basic understanding of
how things work without the obfuscation added by the many optimizations.
You can then move to more recent versions and more easily see what's going
on, even in the face of all the optimizations.

    Antoine> (in that regard, I don't understand what JUMP_FORWARD can
    Antoine> possibly bring over JUMP_ABSOLUTE)

Well, you can't chain jumps together with the latter.  If, for some reason,
you needed to jump forward more than 16kbytes you could accomplish that with
multiple JUMP_FORWARD opcodes.

Skip
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4