http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java File dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java (right):
http://gwt-code-reviews.appspot.com/1442802/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#newcode251 dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:251: assert ident.startsWith("@null::"); On 2011/05/13 17:21:30, scottb wrote:
They were never ignored. Sorry for how subtle this is, I had to dig
myself to
refresh. If you go look at JsniRefLookup.findJsniRefTarget(), you'll
see that
nullMethod/nullField are explicitly handled there. GenerateJavaAST
uses
JsniRefLookup, so that's how it handles refs to nullMethod/nullField.
But GwtAstBuilder doesn't use JsniRefLookup (it doesn't have a
JProgram),
instead it relies on data extracted from JsniChecker, which does a lot
of the
same things as JsniRefLookup. My "Remove JProgram.jsniMap in favor of
local
accounting." change essentially broke null:: refs here (not that it
matters,
because this code isn't live yet). So I needed to add them back, but
since I
don't have a JProgram here, I needed to turn the null method and field
into
singleton objects so I can access them.
I know I've asked this before, but if code isn't live in the runer, we replace it with null.nullMethod(), null.nullField or the likes. Why do we keep this around? Dead Code elimination usually gets rid of it (but not always?) is it just left there to trip over at run time in case there is a bug in our liveness tests? http://gwt-code-reviews.appspot.com/1442802/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
