question about a command like 'goto ' in Python's bytecode orit's just a compiler optimization?
Hendrik van Rooyen
mail at microcorp.co.za
Wed Jun 17 04:01:24 EDT 2009
"Diez B. Roggisch" <d.. at n...m.web.de> wrote:
> Getting a depression because of a compiler is a bit strong...
>
> However, yes, bytecode is similar to assembler, and in that respect
> higher-level control-structures are created using (conditional) jumps.
>
> The same is true for other bytecode-languages, see here for the JVM:
>
> http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#6493
This is right.
It is my opinion that it is not possible to make a useful machine,
virtual or real, which executes instructions sequentially, if the
instruction set does not contain a conditional jump of some sort.
I have tried doing it using conditional calls, and it fails on
the equivalent of the first if ..., elif ... you try to write.
- Hendrik
More information about the Python-list
mailing list