Stephen Haberman has posted comments on this change.

Change subject: Optimize initializing fields at the top scope.
......................................................................


Patch Set 3:

(2 comments)

....................................................
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Line 2342:       canObserveSubclassFields.add(currentClass);
Okay, so I implemented a very naive way of checking if "this" could escape via static method or other-instance instance method parameters: just looking at the type signatures.

It seems effective, as after also ignoring $init (which was showing up with the name "$$init") and ignoring super/this cstr calls, when running the test only 3 classes are being nominated for the correct/slow non-top level field init:

Throwable,
http.client.Request, and
FieldInitOrderBase (the reproduction of the original issue).

All of these nominations seem right, as, inspecting their cstrs, there is polymorphic dispatch to the current instance in each of them.

So I think this is pretty good.


Line 2498: * Classes that could potentially see uninitialized values for fields that are ininitialized in
Done


--
To view, visit https://gwt-review.googlesource.com/3440
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I97a06eb36396a8b8659ce9a025b21a9cf93d0500
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman <stephen.haber...@gmail.com>
Gerrit-Reviewer: Brian Slesinsky <skybr...@google.com>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@gwtproject.org>
Gerrit-Reviewer: Roberto Lublinerman <rlu...@google.com>
Gerrit-Reviewer: Stephen Haberman <stephen.haber...@gmail.com>
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to