[pypy-dev] Status update

Armin Rigo arigo at tunes.org
Wed Jun 15 19:01:50 CEST 2005


An update on the translator status.  Dark obscure stuff has been mostly
sorted out.  Exceptions work all the way from the annotator to the
rtyper to GenC.  There is the beginning of a low-level interpreter now.

Still missing are:

* GenC knows little about float operations.  Need to complete

* Almost all the topics from the rtyper, from the previous
  status report:
  - (hard) prebuilt constants -- PBCs -- and dicts with PBC keys
  - (medium) dicts with string keys, and iterators over them
  - (easy) iterators over strings
  - (medium) iterators over tuples
  - (varying) all built-in functions listed in annotation/builtin.py
  - (mostly easy) a few more operations: id, issubtype, str(?), is
  - (DONE) add_ovf --> int_add_ovf
  - (easy) list methods reverse, pop, insert, index(?)
  - (easy) tuple concatenation
  - (easy) string methods startswith(1-arg), endswith(1-arg),
           join (possibly only on the empty string ''), string slices
  - (easy) equality and non-equality are generally missing
  - (medium) limited form of string formatting: 'constant template' only
             which should only generate a sequence of simple operations
             like concatenation and str() on integers

* The lltype model is, hum, mostly stable but still has changed bits and
  pieces all the time.  One important change already done is that arrays
  can be of primitive types directly.  This means that rlist.py and
  rstr.py can be simplified a bit: for example, in rstr, STR can be
  defined with 'chars' as an Array(Char).  It makes reads and writes to
  characters more natural to write in the ll_() functions.  Another
  simplification is the operation cast_pointer, which replaces
  cast_parent, and which can cast freely pointer types as long as the
  cast is done (in any direction) between a structure and a substructure
  which is the first field of the structure -- or the 1st field of the
  1st field, etc.  This made rclass.py simpler.

* A missing piece of lltype that we'll work on soon is proper support
  for deallocation.  The problem right now is that if you have a pointer
  to a GcStruct 'B' which is actually the 1st field of a larger GcStruct
  'A', and this pointer goes away, GenC generates a decref; if the
  refcount reaches zero, it frees the structure beliving that is really
  a 'B' structure.  This means that the extra part of 'A' is ignored and
  just leaks away.  To solve this, we need to introduce minimal support
  for run-time types -- just some kind of opaque pointer that describes
  what the real, "large" GcStruct is.

* lltype will also need to grow a new primitive type, UnicodeChar.

A bientot,


More information about the Pypy-dev mailing list