python interpreter
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Thu Oct 13 18:30:27 EDT 2005
In <digm1h$9si$1 at online.de>, g.franzkowiak wrote:
> my interest is for the internals of the Python interpreter.
>
> I've used up to now FORTH for something and this indirect interpreter is
> very smart.
> --- ASM ---------------------------------------------------------------
>
> NEXT: LODSW ; WA <- [IP]
> ; IP <- IP+2
> MOV T,WA ; T <- WA1 (CFA)
> JMP [T] ; JMP [CFA]
>
> --- C -----------------------------------------------------------------
>
> for (;;)
> {
> w = *ip++;
> (**w) ();
> }
>
> -------------------------------------------------------------------------
>
> Where can I find informations like this for Python ?
I don't really grok the assembler code. The C code seems to assume that
there is an infinitive number of function pointers stored at `*ip`!?
The Python equivalent might be ::
for w in ip:
w()
if `ip` is a (finite) sequence of functions or callables in general.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list