Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread BobV
As a more complicated example, an internal app has different translations for Latin-American Spanish from the rest of the Spanish translations, so they have es and es_419 as deferred binding properties.  Then they inherit CldrLocales, and automatically get the right set of runtime locales in

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread John Tamplin
On Tue, Mar 9, 2010 at 11:29 AM, BobV b...@google.com wrote: As a more complicated example, an internal app has different translations for Latin-American Spanish from the rest of the Spanish translations, so they have es and es_419 as deferred binding properties. Then they inherit

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread BobV
What does runtime locales do, exactly? -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread John Tamplin
On Tue, Mar 9, 2010 at 12:04 PM, BobV b...@google.com wrote: What does runtime locales do, exactly? Essentially what soft permutations do, for number/date/time formatting rules, currency details, and the default currency for a locale. They are implemented by doing a switch on the runtime

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread BobV
Here's what John and I worked out over IM to get the existing runtime locales support migrated to soft permutations: - The existing locale property continues to work as it currently does. - The runtime.locales configuration property is eliminated in favor of a runtimeLocale deferred-binding

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread Bruce Johnson
Since module-mutator amounts to an API change (and sounds pretty weird from a distance), please update the (nice) design doc and get unanimous consent from the SDK team (after getting contributor feedback from the group here). On Tue, Mar 9, 2010 at 3:31 PM, BobV b...@google.com wrote: Here's

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread John Tamplin
On Tue, Mar 9, 2010 at 3:31 PM, BobV b...@google.com wrote: - The runtimeLocale property is defined and collapsed by a ModuleDefMutator which also defines additional rebind rules based on the defined locale values. - One or more ModuleDefMutators are installed by a module-mutator

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread Bruce Johnson
Thanks for the explanation. Would be really useful to add to the design doc with enough formatting to make it easy to understand. It just seems like a very powerful feature that could interact in very hard-to-understand ways with various build systems, IDEs, etc. So it would need a lot of vetting.

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-09 Thread BobV
On Tue, Mar 9, 2010 at 4:26 PM, Bruce Johnson br...@google.com wrote: Thanks for the explanation. Would be really useful to add to the design doc with enough formatting to make it easy to understand. It just seems like a very powerful feature that could interact in very hard-to-understand ways

[gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread BobV
I've been working on allowing certain GWT.create() rebinds to be implemented at runtime in order to reduce permutation explosion. Design doc: http://code.google.com/p/google-web-toolkit/wiki/SoftPermutations 70% implementation, enough to compile Showcase into one permutation:

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread Bart Guijt
Whoo-hoo, I want this! It *certainly* helps with adding Application Cache support! On Thu, Mar 4, 2010 at 5:24 PM, BobV b...@google.com wrote: I've been working on allowing certain GWT.create() rebinds to be implemented at runtime in order to reduce permutation explosion. Design doc:  

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread BobV
On Thu, Mar 4, 2010 at 12:00 PM, Matt Mastracci matt...@mastracci.com wrote: One comment: is there a lot of overhead in running a switch each time GWT.create() is called?  The method could modify itself the first time it was run to select the correct factory method. It would have to happen in

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread BobV
The fix was the generator needed to know which locales were combined together so it could produce a more optimal shared solution. How would that fit in here? Would it be sufficient if the SelectionProperty interface were to include a getCollapsedValues() that would indicate the other values

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread John Tamplin
On Thu, Mar 4, 2010 at 2:22 PM, BobV b...@google.com wrote: The fix was the generator needed to know which locales were combined together so it could produce a more optimal shared solution. How would that fit in here? Would it be sufficient if the SelectionProperty interface were to

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread Matt Mastracci
On 2010-03-04, at 11:13 AM, BobV wrote: These factory methods need to live in the Java AST so that we can use the type tightener to optimize the (usual-case) polymorphic dispatch. Adding a JHasNameRef node to the AST would allow what you're describing to be built, but I think that would

Re: [gwt-contrib] RFC : Soft permutations for the GWT compiler

2010-03-04 Thread John Tamplin
On Thu, Mar 4, 2010 at 3:17 PM, Matt Mastracci matt...@mastracci.comwrote: We use repeated calls to GWT.create() for dependency injection and to generate code for our internal widget templating framework. Both of them also use nested GWT.create() calls under the hood in generated code for