Snippets

mattip translation failure

Created by mattip
[Timer] Timings:
[Timer] annotate                       --- 273.1 s
[Timer] ==========================================
[Timer] Total:                         --- 273.1 s
[translation:info] Error:
   File "/home/matti/pypy_stuff/pypy/rpython/translator/goal/translate.py", line 318, in main
    drv.proceed(goals)
   File "/home/matti/pypy_stuff/pypy/rpython/translator/driver.py", line 551, in proceed
    result = self._execute(goals, task_skip = self._maybe_skip())
   File "/home/matti/pypy_stuff/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
    res = self._do(goal, taskcallable, *args, **kwds)
   File "/home/matti/pypy_stuff/pypy/rpython/translator/driver.py", line 278, in _do
    res = func()
   File "/home/matti/pypy_stuff/pypy/rpython/translator/driver.py", line 315, in task_annotate
    s = annotator.build_types(self.entry_point, self.inputtypes)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 86, in build_types
    return self.build_graph_types(flowgraph, inputs_s, complete_now=complete_now)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 132, in build_graph_types
    self.complete()
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 193, in complete
    self.complete_pending_blocks()
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 188, in complete_pending_blocks
    self.processblock(graph, block)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 354, in processblock
    self.flowin(graph, block)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 453, in flowin
    self.consider_op(op)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/annrpython.py", line 605, in consider_op
    resultcell = op.consider(self)
   File "/home/matti/pypy_stuff/pypy/rpython/flowspace/operation.py", line 104, in consider
    return spec(annotator, *self.args)
   File "/home/matti/pypy_stuff/pypy/rpython/flowspace/operation.py", line 189, in specialized
    return impl(*[annotator.annotation(x) for x in other_args])
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/unaryop.py", line 795, in getattr
    getbookkeeper().record_getattr(self.classdef.classdesc, attr)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/bookkeeper.py", line 481, in record_getattr
    locations = self.getattr_locations(clsdesc, attrname)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/bookkeeper.py", line 477, in getattr_locations
    attrdef = clsdesc.classdef.find_attribute(attrname)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/classdesc.py", line 240, in find_attribute
    return self.locate_attribute(attr).attrs[attr]
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/classdesc.py", line 236, in locate_attribute
    self._generalize_attr(attr, s_value=None)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/classdesc.py", line 313, in _generalize_attr
    self.bookkeeper.update_attr(self, newattr)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/bookkeeper.py", line 488, in update_attr
    attrdef.validate(homedef=clsdef)
   File "/home/matti/pypy_stuff/pypy/rpython/annotator/classdesc.py", line 120, in validate
    "forbidden here" % (self.name, homedef))
[translation:ERROR] NoSuchAttrError: 

the attribute 'cached_where___new__' goes here to <ClassDef 'pypy.interpreter.baseobjspace.W_Root'>, but it is forbidden here


    v1032 = getattr(w_type_0, ('cached_where___new__'))

In <FunctionGraph of (<ann_override_lookup>:2)lookup_in_type_where____new__ at 0x1261db40>:
no source!
Known variable annotations:
 w_type_0 = SomeInstance(can_be_None=True, classdef=pypy.interpreter.baseobjspace.W_Root)
 v1032 = SomeTuple(items=(SomeInstance(can_be_None=True, classdef=pypy.objspace.std.typeobject.W_TypeObject), SomeInstance(can_be_None=True, classdef=pypy.interpreter.function.StaticMethod)))

Processing block:
 block@27 is a <class 'rpython.flowspace.flowcontext.SpamBlock'> 
 in (<ann_override_lookup>:2)lookup_in_type_where____new__ 
 containing the following operations: 
       v1032 = getattr(w_type_0, ('cached_where___new__')) 
 --end--
[translation] start debugger...
> /home/matti/pypy_stuff/pypy/rpython/annotator/classdesc.py(120)validate()
-> "forbidden here" % (self.name, homedef))
(Pdb+) 

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.