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

Fixed length list doesn't have its length property inlined by dart2js #9849

Closed
sethladd opened this issue Apr 11, 2013 · 6 comments
Closed

Comments

@sethladd
Copy link
Contributor

Consider this code:

final List colors = new List(3);

main() {
  for (var i = 0; i < colors.length; i++) {
    print(colors[i]);
  }
}

dart2js generates this:

$.main = function() {
  var i;
  for (var i = 0; i < $.get$length$as($.get$colors()); ++i)
    $.Primitives_printString($.toString$0($.$index$as($.get$colors(), i)));
};

Could it know the length of colors at compile time, and inline the number 3 ?

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

@karlklose
Copy link
Contributor

Verified fixed in 79a8654.

@kevmoo kevmoo removed the triaged label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants