[Pharo-users] #ast vs. #parseTree

Marcus Denker marcus.denker at inria.fr
Wed May 4 03:19:54 EDT 2016

> On 01 May 2016, at 14:45, Sean P. DeNigris <sean at clipperadams.com> wrote:
> Marcus Denker-4 wrote
>> #ast returns a result from the cache, while #parseTree always gets a new
>> one…
> Ah, okay. What is the difference? That is, how/when is the cache updated?

-> added on first call of #ast
-> cleaned on image shutdown.

This is not yet really good, but works amazingly well for being so simple.

I want to change it to be LRU and not grow too large… clients that are interested
in persisting the AST (e.g. due to annotations) do that now already to survive shutdown.

E.g. if you put a breakpoint, the AST of *that* method will survive shutdown… so a LRU cache
would not change that.

> Marcus Denker-4 wrote
>> Yes, it could be better. Like always.
> :)

I will add comments… and the API should be improved, too, but not now.


More information about the Pharo-users mailing list