[pypy-dev] Question about pypy

Alexander Golec alexgolecmailinglists at gmail.com
Sat Dec 3 21:22:23 CET 2011


Hi all,

I'm a student at Columbia University, and I'm taking a graduate course with Alfred Aho, the author of the dragon book, on advanced compilers techniques. I've been researching the pypy project in general, and rpython in particular, and I'd like to ask you guys for some feedback on the current sketch of my presentation. Aho has mentioned on several occasions that he is very excited to receive my talk, and I'd like to get some feedback from you guys about it before I put it forward to him. 

So then, my talk will discuss rpython's approach to translation, and here is the current outline: 

 - Compiling python to C is easy: just inline the implementation of every opcode handler durr hurr hurr
 - Ok, seriously, can you do it in a performant manner?
 - Python has some semantics that make this difficult, in particular:
    - opcodes are type-agnostic
    - opcodes are high-level, they do high-level things with high-level arguments. eg. the BUILD_CLASS opcode
    - opcodes include namespace operations
 - This type-agnostic bit is the real tricky part because C requires all expressions to have a type, while python does not
 - Vanilla cartesian product type inference doesn't really work because the number of types is undecidable
 - rpython gets around this by imposing a restriction on dynamic type creation. 
 - The details of the annotator are omitted due to time constraints

So then, the crux of my talk is the type annotator. I won't be going deeply into the flow and object spaces in the talk, deferring to my paper. Is there anything major I'm missing? Did I get anything horribly wrong? 

Alex


More information about the pypy-dev mailing list