LGTM. You're right, you can't do it statically because the array type
can be from a cast.



http://gwt-code-reviews.appspot.com/1470801/diff/1003/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Array.java
File
dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Array.java
(right):

http://gwt-code-reviews.appspot.com/1470801/diff/1003/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Array.java#newcode220
dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Array.java:220:
&& !Cast.canCastUnsafe(value, -array.queryId)) {
This looks like a good trick. I'm a little uneasy about the amount of
magic constants throughout the GWT compiler surrounding queryId 0 and 1
(not really specific to your patch). Some time in the future, we perhaps
should look at refactoring all these magic constant dependencies.

http://gwt-code-reviews.appspot.com/1470801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to