[pypy-dev] Annotating space status
Guido van Rossum
guido at python.org
Wed Jul 2 21:18:08 CEST 2003
> the problem is our fix-point condition which is mostly based purely
> on types, and that we are trying to have it both ways, doing some
> mixture of constant propagation (normal eval) and type propagation,
> if you consider code like this:
>
> x = 0
> while True:
> x = x + 2
>
> type propagation can end, but constant evaluation will give an
> infinite loop.
>
> So we should clarify what we really want.
>
> One possibility is optinally instead of using types to decide
> fix-points, we stop if some bytecode (position) has been encountered
> more than N times.
Right. We could differentiate this by using the differentiation of
object space and execution context for evaluation of internal helpers.
Those helpers want constant evaluation, and they already get a
different object space (a subclass of the annotating object space).
The space controls the execution context, and the execution context
controls whether we check for fix-point conditions.
The "real" code would continue to use the "normal" annotation space
and would do full type propagation.
Unfortunately I won't have time to work on this...
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Pypy-dev
mailing list