Hi,
I've just found a bug in lltypesystem; to reproduce type the following in translatorshell.py:

>>> from __future__ import division
>>> def bug(x,y):
...   return x/y
...
>>> t = Translation(bug)
>>> t.annotate([int, int])
[cut]
>>> t.rtype()
[translation:info] already done: Annotating&simplifying
[translation:info] RTyping...
[flowgraph] (pypy.rpython.lltypesystem.rclass:619)ll_runtime_type_info
[annrpython] <FunctionGraph of (pypy.rpython.lltypesystem.rclass:619)ll_runtime_type_info__objectPtr at 0xb79ef94c> -> SomePtr(ll_ptrtype=<* RuntimeTypeInfo (opaque)>)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
File "/home/anto/pypy/pypy-dist/pypy/translator/interactive.py", line 122, in rtype
    return self.driver.rtype()
File "/home/anto/pypy/pypy-dist/pypy/translator/driver.py", line 68, in proc
    return self.proceed(backend_goal)
File "/home/anto/pypy/pypy-dist/pypy/translator/driver.py", line 355, in proceed
    return self._execute(goals, task_skip = self._maybe_skip())
File "/home/anto/pypy/pypy-dist/pypy/translator/tool/taskengine.py", line 108, in _execute
    res = self._do(goal, taskcallable, *args, **kwds)
File "/home/anto/pypy/pypy-dist/pypy/translator/driver.py", line 140, in _do
    res = func()
File "/home/anto/pypy/pypy-dist/pypy/translator/driver.py", line 186, in task_rtype
    crash_on_first_typeerror=not opt.insist)
File "/home/anto/pypy/pypy-dist/pypy/rpython/rtyper.py", line 144, in specialize
    self.specialize_more_blocks()
File "/home/anto/pypy/pypy-dist/pypy/rpython/rtyper.py", line 175, in specialize_more_blocks
    self.specialize_block(block)
File "/home/anto/pypy/pypy-dist/pypy/rpython/rtyper.py", line 286, in specialize_block
    self.translate_hl_to_ll(hop, varmapping)
File "/home/anto/pypy/pypy-dist/pypy/rpython/rtyper.py", line 413, in translate_hl_to_ll
    resultvar = hop.dispatch()
File "/home/anto/pypy/pypy-dist/pypy/rpython/rtyper.py", line 625, in dispatch
    return translate_meth(self)
File "None</fat/pypy/pypy-dist/py/code/source.py:215>", line 5, in translate_op_truediv File "/home/anto/pypy/pypy-dist/pypy/rpython/rint.py", line 93, in rtype_truediv
    return _rtype_template(hop, 'truediv', [ZeroDivisionError])
File "/home/anto/pypy/pypy-dist/pypy/rpython/rint.py", line 186, in _rtype_template
    return hop.genop(repr.opprefix+func, vlist, resulttype=repr)
File "/home/anto/pypy/pypy-dist/pypy/rpython/rmodel.py", line 102, in __getattr__
    raise AttributeError("%s instance has no attribute %s" % (
AttributeError: FloatRepr instance has no attribute opprefix
>>>

ciao Anto
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to