[pypy-dev] problems compiling with complex

Stephan Diehl stephan.diehl at gmx.net
Sat Feb 11 18:01:17 CET 2006

since IRC is a bit impractical for error messages, I'm using this medium.
I made some progress on the complex type: it's annotatable now.
But I still can't compile it:
The last lines I get, are:

[rtyper] specializing: 44900 / 45069 blocks   (99%)
[rtyper] specializing: 45000 / 45069 blocks   (99%)
[flowgraph] (pypy.rpython.lltypesystem.rclass:623)ll_issubclass
[flowgraph] (pypy.rpython.lltypesystem.rclass:620)ll_type
[translation:ERROR] Error:
[translation:ERROR]  Traceback (most recent call last):
[translation:ERROR]    File "./translate_pypy.py", line 319, in main
[translation:ERROR]     drv.proceed(goals)
[translation:ERROR]    File 
"/home/stephan/projects/pypy-dist/pypy/translator/driver.py", line 343, in 
[translation:ERROR]     return self._execute(goals, task_skip = 
[translation:ERROR]    File 
"/home/stephan/projects/pypy-dist/pypy/translator/tool/taskengine.py", line 
108, in _execute
[translation:ERROR]     res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR]    File 
"/home/stephan/projects/pypy-dist/pypy/translator/driver.py", line 140, in 
[translation:ERROR]     res = func()
[translation:ERROR]    File 
"/home/stephan/projects/pypy-dist/pypy/translator/driver.py", line 186, in 
[translation:ERROR]     crash_on_first_typeerror=not opt.insist)
[translation:ERROR]    File 
"/home/stephan/projects/pypy-dist/pypy/rpython/rtyper.py", line 148, in 
[translation:ERROR]     self.exceptiondata.make_helpers(self)
[translation:ERROR]    File 
line 31, in make_helpers
[translation:ERROR]     self.fn_pyexcclass2exc   = 
[translation:ERROR]    File 
line 79, in make_pyexcclass2exc
[translation:ERROR]     assert not clsdef.attrs, (
[translation:ERROR]  AssertionError: <class exceptions.ValueError at 
0xb7f9eadc> should not have grown atributes
[translation] batch mode, not calling interactive helpers

I have no idea, where this is coming from.
Maybe connected to this (or not, who knows) are a lot of warning like this:

[rtyper:WARNING] prebuilt instance W_DictObject(r_dict({})) has no attribute 
[rtyper:WARNING] prebuilt instance W_DictObject(r_dict({})) has no attribute 

I'm probably doing something wrong with the 'real', 'imag' properties that are 
defined in 'complextype.py'.
I do believe (of course) that the code in question is right since it works 
when running pypy over cpython (but then, some other bugs didn't show when 
running over cpython as well)

Any hints on what's going wrong are greatly appreciated.



More information about the Pypy-dev mailing list