[pypy-dev] pypy for typed languages?

William Leslie william.leslie.ttg at gmail.com
Fri Mar 13 03:17:18 CET 2009


(sorry Geoffrey for the missend)

2009/3/13 Geoffrey Irving <irving at naml.us>:
> Hello,
Hi! and welcome.

> I'm curious about whether pypy could be practically applied to a
> typed front end language, say with the following basic set of
> features:
>
> 1. Packed storage such as C structs and arrays.

>From my limited understanding this shouldn't be too difficult. Packed storage is
provided at app level, for example, by the ctypes and rawffi modules, and at
interpreter level by using lltypes directly (which is what the JIT operates on).
You could evaluate defstruct by manipulating lltypes. Class definitions could
possibly use rpython.rclass (maybe with a few modifications if classes have
strict layout requirements too).


> 2. A Hindley Milner polymorphic type system with type classes.

I'll leave it to someone with a better knowledge of how the JIT takes advantage
of types to answer this.

William Leslie



More information about the Pypy-dev mailing list