Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 12094103: Added MappedListIterable/Iterator to implement map() on Lists. (Closed)

Created:
7 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 10 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added MappedListIterable/Iterator to implement map() on Lists. Committed: https://code.google.com/p/dart/source/detail?r=18036

Patch Set 1 #

Total comments: 6

Patch Set 2 : Remove unused code. #

Patch Set 3 : Adding missing EmptyIteartor/Iterable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -93 lines) Patch
M runtime/lib/array.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/growable_array.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection/collections.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/collection_dev/iterable.dart View 1 2 3 chunks +406 lines, -0 lines 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 36 chunks +36 lines, -36 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 36 chunks +36 lines, -36 lines 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 2 6 chunks +6 lines, -6 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 1 2 6 chunks +6 lines, -6 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/templates/immutable_list_mixin.darttemplate View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-02-01 09:27:42 UTC) #1
floitsch
LGTM. can't the MappedList not share some of the functionality? https://codereview.chromium.org/12094103/diff/1/sdk/lib/collection_dev/iterable.dart File sdk/lib/collection_dev/iterable.dart (right): https://codereview.chromium.org/12094103/diff/1/sdk/lib/collection_dev/iterable.dart#newcode143 ...
7 years, 10 months ago (2013-02-01 15:00:36 UTC) #2
Lasse Reichstein Nielsen
Sadly we can't reuse MappedList code. It's based on the Iterable *being* a List (having ...
7 years, 10 months ago (2013-02-01 15:13:57 UTC) #3
floitsch
There must be ways to share code, but let's do this at another time. https://codereview.chromium.org/12094103/diff/1/sdk/lib/collection_dev/iterable.dart ...
7 years, 10 months ago (2013-02-01 15:23:39 UTC) #4
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-02-04 09:30:16 UTC) #5
https://codereview.chromium.org/12094103/diff/1/sdk/lib/collection_dev/iterab...
File sdk/lib/collection_dev/iterable.dart (right):

https://codereview.chromium.org/12094103/diff/1/sdk/lib/collection_dev/iterab...
sdk/lib/collection_dev/iterable.dart:143: for (int i = _startIndex, n =
_endIndex; i < n; i++) {
If we can see a difference in performance after profiling, I'm willing to
rewrite _endIndex. Or wait for the VM to get better at analyzing.

Powered by Google App Engine
This is Rietveld 408576698