On 2010/09/02 13:44:49, scottb wrote:
Okay, so here's my main issue with the general idea.  As far as I can
tell, the
lifetime of the 'storage' is the same as the lifetime of generator
instances.

I thought we agreed after discussing the previous patch for this that
the GeneratorContext was the right lifetime cycle for these caches?

I sort of see how it's expedient to have it accessible via
GeneratorContext...
however, the downside is you give up static typing and red squiggleys
if you try
to lookup something that isn't there.  Net-net, I'm not sure we want
to add more
methods to support, that don't really buy anything.

Instead of passing GeneratorContext's everywhere, any Generator
subsystem could
pass around a strongly-typed thing instead; or even extend
GeneratorContext and
add a couple of strongly-typed getters.

It's unclear to me from your suggestions how to get the same lifetime
for the caches. If the generators themselves hold onto them, then they
won't survive across different instances of the generator in the same
ModuleSpace.


http://gwt-code-reviews.appspot.com/826802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to