Reviewers: jgw,

Message:
Review requested.

Description:
This changes the generated ClientBundle code to initialize
ResourcePrototypes in the ClientBundle's static initializer.
Previously, resource instances were instantiated lazily in the resource
accessor methods.  This led to inefficient JavaScript code generation
for usage patterns like:

ClientBundle cb = GWT.create(ClientBundle.class);
elt.setClass(cb.css().a());
elt2.setClass(cb.css().b());

The repeated invocations of the css() method would always result in an
if-null check being inlined into the callsite.

Please review this at http://gwt-code-reviews.appspot.com/583801/show

Affected files:
M user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java


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

Reply via email to