I would appreciate a once over by Ray or Scott before I commit.
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java
File dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java
(right):
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java#newcode439
dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java:439: *
On 2011/06/08 05:24:10, jbrosenberg wrote:
javadoc style {@link ...} syntax? Or @see ...?
I did this and made the comment javadoc, which seems weird to me because
it is in the middle of a block of code, but it makes the links work kind
of sort of in eclipse.
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java#newcode446
dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java:446:
JMethod method =
program.getIndexedMethod("Cast.throwClassCastExceptionUnlessNull");
On 2011/06/08 05:24:10, jbrosenberg wrote:
Hmm....I think there's more to it than that. It just wouldn't be
correct to
implicitly upcast the expression to be of type Object (even if it's a
null
value). The "magic" is to make the method return a type JNullType,
which is
"compatible" with an expression of any type that is guaranteed to be
null valued
(since null can be cast to any type). We can't force the type to the
original
type of the cast, because that type info is lost at this point (since
it was
overwritten to JNullType).
The reason the source method "throwClassCastExceptionUnlessNull" is
defined with
a return type of Object in Cast.java, is because it needs to be valid
java (no
JNullType in java).
How about:
"Note, we must update the type of this method call to return the null
type."
Done.
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
File dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
(right):
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java#newcode377
dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java:377: *
On 2011/06/08 05:24:10, jbrosenberg wrote:
How about (just quibbling here):
"Code flow analysis is run separately on methods which implement
RunAsyncCallback.onSuccess(), as top-level entry points."
Done.
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
File dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
(right):
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java#newcode65
dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java:65: /*
On 2011/06/08 05:24:10, jbrosenberg wrote:
".... to implementations of RunAsyncCallback.onSuccess()...."
Done.
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
File dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
(right):
http://gwt-code-reviews.appspot.com/1453804/diff/8001/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java#newcode346
dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java:346: *
Exception.
On 2011/06/08 05:24:10, jbrosenberg wrote:
"See {@link CastNormalizer}."
Done.
http://gwt-code-reviews.appspot.com/1453804/
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors