Stephen Haberman has posted comments on this change.

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


Patch Set 5:

(2 comments)

....................................................
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
Line 2216: * Technically, to match JVM semantics, we should only do this for final or static fields. For Well, I had added a test to CompilerTest in the last CL that does assert the semantics are correct/match the JVM. Which I thought was the most important part.

For this CL, since the optimization does not change any observable program behavior, I'd have to assert against the generated javascript--e.g. assert this field literal as assigned on the prototype.

I know other GWT tests do this (assert against the JS), but I didn't see any infrastructure in CompilerTest for doing that...I think I'd have to make a separate test and copy/paste some other approach...

Should I explore that?


Line 2225:       if (x.getLiteralInitializer() != null) {
I like minimized nested as well; will change.


--
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: 5
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: Matthew Dempsky <mdemp...@google.com>
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