[pypy-dev] annotation problem

Armin Rigo arigo at tunes.org
Thu Mar 16 13:45:50 CET 2006

Hi Christian,

On Wed, Mar 15, 2006 at 11:39:52PM -0800, Christian Tismer wrote:
> For some reason, it thinks my Stack() is a SomeObject.

No, it says Exception: not supported on class
'pypy.interpreter.miscutils.Stack' because it needs specialization,
which is very different.  I think it was already discussed here some
time ago: the cause is that a pre-built instance of Stack cannot appear,
because then the annotator doesn't know of which specialized version of
the Stack class this instance should be.  In your case, it's the
'framestack' attribute of the main AppCoroutine...

There is no easy way to fix this.  You need either to build the main
AppCoroutine lazily, or not use the Stack class :-/  or find a more
obscure hack along the lines of the one we used for ExecutionContext,
which also has a 'framestack'.  (The hack was to delicately remove the
prebuilt ExecutionContext instance during annotation, so that the
compiled PyPy doesn't contain one and will rebuild one at start-up.)

A bientot,


More information about the Pypy-dev mailing list