unladen swallow: python and llvm

Nick Craig-Wood nick at craig-wood.com
Sun Jun 7 14:29:39 EDT 2009


Neuruss <luismgz at gmail.com> wrote:
>  ok, let me see if I got it:
>  The Python vm is written in c, and generates its own bitecodes which
>  in turn get translated to machine code (one at a time).
>  Unladen Swallow aims to replace this vm by one compiled with the llvm
>  compiler, which I guess will generate different bytecodes, and in
>  addition, supplies a jit for free. Is that correct?

Pretty good I think!

>  It's confussing to think about a compiler which is also a virtual
>  machine, which also has a jit...

Well the compiler is actually gcc with a llvm opcodes backend.

>  Another thing that I don't understand is about the "upfront"
>  compilation.
>  Actually, the project plan doesn't mention it, but I read a comment on
>  pypy's blog about a pycon presentation, where they said it would be
>  upfront compilation (?). What does it mean?

I don't know, I'm afraid.

>  I guess it has nothing to do with the v8 strategy, because unladen
>  swallow will be a virtual machine, while v8 compiles everything to
>  machine code on the first run. But I still wonder what this mean and
>  how this is different.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list