[PyPy-issue] [issue545] Rare bug in optimizeopt

Armin Rigo pypy-dev-issue at codespeak.net
Tue Jun 8 13:55:55 CEST 2010

Armin Rigo <arigo+pypyissues at codespeak.net> added the comment:

Then the bug is to have an opcode called CALL_PURE and disagreeing on what it's
supposed to be used for :-)  My definition of a pure function is that if all the
arguments are the same, then calling the function has no side-effects and always
returns the same value.

Of course _pure_lookup_where_with_method_cache() has side-effects in theory, but
as far as I see they are all "caching" effects only, so it seems at first that
it is pure in the sense that I described above.  But it seems from your trace
that it does not.  It still does not look like there is anything wrong with

It would look like we could change optimizeopt to not repeat the calls but just
fish the return value from the returned Box, but I remember that we decided at
some point that relying in optimizeopt on what is contained in the Boxes was
wrong.  So I don't see what could possibly be changed there.

PyPy development tracker <pypy-dev-issue at codespeak.net>

More information about the Pypy-issue mailing list