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

Issue 12262037: Make List.skip, List.take and List.reversed return Iterables, not 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

Make List.skip, List.take and List.reversed return Iterables, not Lists. Removes ListView. It was premature optimization to have classes that combined any sequence of reverse, skip and take instead of just wrapping iterables. Committed: https://code.google.com/p/dart/source/detail?r=18570

Patch Set 1 #

Total comments: 3

Patch Set 2 : Address comments, small fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -746 lines) Patch
M editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/java_core.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/lib/array.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/lib/growable_array.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/observable/observable.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_collection_dev/iterable.dart View 1 8 chunks +28 lines, -334 lines 0 comments Download
M sdk/lib/_collection_dev/list.dart View 3 chunks +16 lines, -246 lines 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 4 chunks +5 lines, -5 lines 0 comments Download
M sdk/lib/core/list.dart View 1 chunk +2 lines, -6 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/html/html_common/filtered_element_list.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 6 chunks +6 lines, -6 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 1 6 chunks +6 lines, -6 lines 0 comments Download
M tests/corelib/iterable_skip_test.dart View 1 7 chunks +21 lines, -21 lines 0 comments Download
M tests/corelib/iterable_take_test.dart View 8 chunks +0 lines, -22 lines 0 comments Download
M tests/corelib/list_reversed_test.dart View 1 2 chunks +111 lines, -15 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 2 chunks +2 lines, -2 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 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: 3 (0 generated)
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-02-14 09:49:25 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/12262037/diff/1/sdk/lib/_collection_dev/iterable.dart File sdk/lib/_collection_dev/iterable.dart (right): https://codereview.chromium.org/12262037/diff/1/sdk/lib/_collection_dev/iterable.dart#newcode287 sdk/lib/_collection_dev/iterable.dart:287: if (_endOrLength < newEnd) return this; Usually we ...
7 years, 10 months ago (2013-02-14 15:33:07 UTC) #2
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-02-15 14:04:26 UTC) #3
Message was sent while issue was closed.
https://codereview.chromium.org/12262037/diff/1/tests/corelib/iterable_skip_t...
File tests/corelib/iterable_skip_test.dart (left):

https://codereview.chromium.org/12262037/diff/1/tests/corelib/iterable_skip_t...
tests/corelib/iterable_skip_test.dart:16: Expect.isTrue(skip0 is List);
On 2013/02/14 15:33:07, floitsch wrote:
> Alternatively make sure it is *not* a list.

Done.

Powered by Google App Engine
This is Rietveld 408576698