Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart2js: getInterceptedClassesOn should return ordered 'set' #8636

Open
rakudrama opened this issue Feb 19, 2013 · 5 comments
Open

dart2js: getInterceptedClassesOn should return ordered 'set' #8636

rakudrama opened this issue Feb 19, 2013 · 5 comments
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

Comments

@rakudrama
Copy link
Member

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:

  1. Put declared types before other (unchecked) types.

"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.

  1. Do two type analyses: (A) ignore noSuchMethod (B) include noSuchMethod. Put types from (A) first.

"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.

@kasperl
Copy link

kasperl commented Apr 22, 2013

Added this to the Later milestone.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@vsmenon vsmenon added the area-web Issues related to Dart Web. label Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants