[pypy-dev] question on rpython stack reconstruction feature

Armin Rigo arigo at tunes.org
Fri May 29 18:13:16 CEST 2009

Hi Alan,

On Fri, May 29, 2009 at 08:19:27AM -0700, alan yung wrote:
> I called them from normal Python application (in stackless translated pypy
> vm) and the behaviour is that they don't have any effect. There's no
> (interpreter level/application level) stack unwinding or resuming.

Ah, that's step 1.  I see.  As this is RPython code, it means that you
cannot use some constructs -- in this case, the problem is that "if not
freezed_executioncontext:" is constant-folded, so it is always True
(which is of course not the case in a normal Python program).  You don't
have varying global lists in RPython, so you need to create a small
class, create a global instance of it, and then you can read/write an
attribute "freeze_executioncontext" on it.

A bientot,


More information about the Pypy-dev mailing list