http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java File dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java (right):
http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java#newcode439 dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java:439: * method, which then gets inlined. It's worth thinking about in the future that clever ordinalization *could* allow the VALUES to exist, it would just be an array of integers instead of objects. http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java File dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java (left): http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#oldcode857 dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:857: * a program. I assume this is TODONE now? http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java File dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java (right): http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode251 dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:251: assertTrue(tracker.isOrdinalized("test.EntryPoint$Fruit")); Is Tracker only used for testing? If so, it looks like you could throw it away in a future change, since you can now query the JEnumType directly. http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode273 dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:273: "String y = fruit.staticField;"); Are you sure this *should* prevent ordinalization? Even if you turn off all optimizations, GenerateJavaScriptAST generates a comma expression here, like (fruit, Fruit_staticField). http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode287 dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:287: "int y = fruit.staticMethod();"); Same here. http://gwt-code-reviews.appspot.com/1428808/diff/1/dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java#newcode456 dev/core/test/com/google/gwt/dev/jjs/impl/EnumOrdinalizerTest.java:456: "}"); Is this a good test? The upcast to Object should have already blacklisted it, so I'm not sure you're testing instanceof. http://gwt-code-reviews.appspot.com/1428808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
