[pypy-dev] [pypy-commit] pypy reflex-support: Remove elidable_promote that made the translation choke.

wlavrijsen at lbl.gov wlavrijsen at lbl.gov
Thu Aug 25 18:14:09 CEST 2011


Hi Anto,

>> -    @jit.elidable_promote()
>>       def _get_offset(self, w_cppinstance):
>>           cppinstance = self.space.interp_w(W_CPPInstance, w_cppinstance, 
>> can_be_None=True)
>>           if cppinstance:
>
> are you sure that you really want to kill this promote? I suspect that it 
> makes accessing to C++ fields much slower, because it has to recalculate the 
> offset every time.

just as a follow-up, this was the translation problem I ran into:

[translation:ERROR]    File "/home/wlav/pypydev/pypy/pypy/jit/codewriter/jtransform.py", line 271, in rewrite_op_direct_call
[translation:ERROR]     return getattr(self, 'handle_%s_call' % kind)(op)
[translation:ERROR]    File "/home/wlav/pypydev/pypy/pypy/jit/codewriter/jtransform.py", line 319, in handle_residual_call
[translation:ERROR]     calldescr = self.callcontrol.getcalldescr(op)
[translation:ERROR]    File "/home/wlav/pypydev/pypy/pypy/jit/codewriter/call.py", line 247, in getcalldescr
[translation:ERROR]     assert effectinfo is not None
[translation:ERROR]  AssertionError

for functions, I have the interp_w in the calling function, so I'm guessing
that the problem is with the promote, not with the elidability. I'll change
that to be the same as for functions, which should then work.

Actually, I'm thinking that an assert would work just as well. But that would
really be the kind of optimization that I'm not yet in for. :)

Best regards,
            Wim
-- 
WLavrijsen at lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net


More information about the pypy-dev mailing list