Another iteration of the patch that simplifies the cross-casting of JSO subtype arrays by upcasting all JSO subtype arrays to JavaScriptObject[]. This ensures that array object identity will be preserved, even after an "illegal" cast between incompatible array types.
Changes to look at: - Added new rewriting pass RewriteJsoArrays - Methods with JsoSubtype[] parameters have their names mangled - Constructors have a synthetic disambiguator parameter added since we can't change the name. HostedModeClassRewriter.RewriterOracle has a new method to provide the disambiguating ordinal value for naming the type. - Callsites are updated as necessary. - Since this mangles method names or method signatures, I've introduced an @OriginalJsniSignature annotation, which this pass uses to override the reflectively-driven dispatchId assignment. DispatchClassInfo reads this annotation. - Factored out DebugAnalyzerAdapter out of RewriteJsoCasts to share debug logging with RewriteJsoArrays - Removed JsoSubtype array class literal handling in RewriteJsoCasts Unless we're willing to hijack System.arrayCopy() and Collection.toArray(), there's not a lot that can be done about making these work with a source array containing JSO wrappers that are incompatible with the destination array type. http://gwt-code-reviews.appspot.com/473801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors