dart2js: getInterceptedClassesOn should return ordered 'set' #8636
Labels
area-web
Issues related to Dart Web.
dart2js-optimization
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
web-dart2js
I think it is worth ensuring that getInterceptedClassesOn returns a meaningfully ordered list of classes rather than a set.
The immediate benefit is that it would localize the code that keeps the output insensitive to small changes in the source code (and remove the sorting I put in the namer, which has insufficient context).
Later it could be used for better specializations that have the same Set:
Ideas for determining the order:
"a.length" compiles to $.getInterceptor$XXX(a).getLength(a)
It is likely that the fastest order of checks in getInterceptor$XXX is consistent with the declared type. String, List, NodeList all have different optimal orders, suggesting different specializations.
"a.b.length" where the inferred type of "a" is dynamic and is possibly a proxy using noSuchMethod might benefit from knowing that the only declared implementations of get$b are inferred to return String.
The text was updated successfully, but these errors were encountered: