[pypy-dev] Re: [gmane.comp.python.pypy] deep breakage

Michael Hudson mwh at python.net
Mon Jun 9 14:16:31 CEST 2003


Michael Hudson <mwh at python.net> writes:

>> This is the same problem as in CPython. Most failing internal operations call
>> PyErr_SetString(), which causes a string to be used as the exception value.
>> The hack is that when the user code reaches an 'except' clauses the exception
>> is "normalized", which translates the pair "TypeError class + string" into the
>> pair "TypeError class + TypeError instance".
>
> I think I now have code that does this, after modifying
> decode_code_arguments to not try to catch IndexError (that one was fun
> to find!).

I've checked my code in.  I'm not totally certain of it, but I was
able to reenable a few tests of the exception machinery in
test_interpreter.py, so I'm going to pronounce it "good enough for
now".

Incidentally, on this machine

Plain Old Python does something like 5-6000 pystones a sec
PyPy/TrivialObjSpace does ~ 7
PyPy/StdObjSpace does ~ 0.2

(this is in the battery-saving reduced processor performance mode, &
with some hacks to let pyston import time.clock)

Cheers,
M.

-- 
  Worryingly, DEFUN appears to be a function that removes all the
  fun from something: after using it all your code is converted 
  to C++.                              -- Tim Bradshaw, comp.lang.lisp



More information about the Pypy-dev mailing list