[pypy-dev] Re: [pypy-svn] r24500 - pypy/dist/pypy/doc/weekly

Michael Hudson mwh at python.net
Fri Mar 17 01:52:12 CET 2006

mwh at codespeak.net writes:

> Author: mwh
> Date: Fri Mar 17 01:37:26 2006
> New Revision: 24500
> Modified:
>    pypy/dist/pypy/doc/weekly/summary-2006-03-15.txt
> Log:
> pypy-c _finally_ built, so add some (not too good) performance numbers.
> looking at the c source reveals that the inlining is not as thorough as we
> might have liked for a sort of "haha" reason: direct_calls in 'finally'
> cleanups are not inlined (presumably 'except' cleanups have the same problem).
> maybe it should be an except block and a cleanup block, or something.

So it's late and I should be in bed and so on, but this 'cleanup'
thing is getting really horrible.  So here's how I think it should
work: a SpaceOperation that can raise an exception has a *Link* to a
Block that should be taken when an error is raised.  Then things can
be inlined into these blocks, it's natural to chain the blocks to
replicate the falling through of error labels in the old genc code,
there are (hopefully) fewer special cases and so on.

I think the 'finally' operations should just go after the operation.
To avoid getting into trouble with c_last_exception cases, code that
cares should search back through the block's operations to find one
with a cleanup link (if finally operations can raise, we're already in

Thoughts?  I have another train ride tomorrow when I might be able to
play with this.


 The rapid establishment of social ties, even of a fleeting nature,
 advance not only that goal but its standing in the uberconscious
 mesh of communal psychic, subjective, and algorithmic interbeing.
 But I fear I'm restating the obvious.  -- Will Ware, comp.lang.python

More information about the Pypy-dev mailing list