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

Issue 11169004: Add "contains" method to Collection. (Closed)

Created:
8 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 2 months ago
Reviewers:
floitsch, antonm, ngeoffray, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add "contains" method to Collection. Also added a Sequence interface to capture things with a length and integer indexing. List and String implement that interface, and there is a base skeleton class for collections that are Sequences. BUG=1030 Committed: https://code.google.com/p/dart/source/detail?r=13766

Patch Set 1 #

Total comments: 32

Patch Set 2 : Use generator for html. #

Total comments: 2

Patch Set 3 : Fixed last illegal-access #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -112 lines) Patch
M lib/compiler/implementation/lib/interceptors.dart View 1 2 1 chunk +8 lines, -3 lines 0 comments Download
M lib/core/collection.dart View 1 2 chunks +60 lines, -29 lines 0 comments Download
M lib/core/core.dart View 1 chunk +1 line, -0 lines 0 comments Download
M lib/core/corelib_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M lib/core/list.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
A lib/core/sequences.dart View 1 2 1 chunk +204 lines, -0 lines 0 comments Download
M lib/core/string.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/coreimpl/collections.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M lib/html/dart2js/html_dart2js.dart View 65 chunks +131 lines, -17 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 64 chunks +130 lines, -16 lines 0 comments Download
M lib/html/scripts/systemhtml.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lib/html/src/Isolates.dart View 1 2 chunks +3 lines, -3 lines 0 comments Download
M lib/html/src/_Collections.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M lib/html/src/_Lists.dart View 1 1 chunk +0 lines, -1 line 0 comments Download
M lib/html/templates/html/dart2js/impl_Console.darttemplate View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/impl/impl_Document.darttemplate View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/html/templates/html/impl/impl_DocumentFragment.darttemplate View 1 1 chunk +4 lines, -0 lines 0 comments Download
M lib/html/templates/html/impl/impl_Element.darttemplate View 1 5 chunks +18 lines, -2 lines 0 comments Download
M lib/html/templates/html/impl/impl_Node.darttemplate View 1 1 chunk +2 lines, -0 lines 0 comments Download
M lib/html/templates/html/impl/impl_NodeList.darttemplate View 1 2 chunks +4 lines, -0 lines 0 comments Download
M lib/html/templates/immutable_list_mixin.darttemplate View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/lib/array.dart View 1 2 chunks +6 lines, -6 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/lib/growable_array.dart View 1 2 chunks +4 lines, -26 lines 0 comments Download
M tests/corelib/collection_to_string_test.dart View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Lasse Reichstein Nielsen
8 years, 2 months ago (2012-10-16 13:03:42 UTC) #1
floitsch
LGTM although I'm not sure how to solve the "bad return type for map and ...
8 years, 2 months ago (2012-10-16 14:03:19 UTC) #2
ngeoffray
https://codereview.chromium.org/11169004/diff/1/lib/core/collection.dart File lib/core/collection.dart (right): https://codereview.chromium.org/11169004/diff/1/lib/core/collection.dart#newcode66 lib/core/collection.dart:66: Dynamic reduce(var initialValue, Why is this one 'var'? https://codereview.chromium.org/11169004/diff/1/lib/core/collection.dart#newcode67 ...
8 years, 2 months ago (2012-10-16 15:08:18 UTC) #3
sra1
The lib/html changes need to be made by changing the generator, not editing the output: ...
8 years, 2 months ago (2012-10-16 18:52:52 UTC) #4
Lasse Reichstein Nielsen
Now using the generator to generate html-files. The bad return type of map/filter can't really ...
8 years, 2 months ago (2012-10-17 11:06:45 UTC) #5
Lasse Reichstein Nielsen
Please take a new look at the template changes.
8 years, 2 months ago (2012-10-17 11:07:37 UTC) #6
floitsch
https://codereview.chromium.org/11169004/diff/1/lib/core/sequences.dart File lib/core/sequences.dart (right): https://codereview.chromium.org/11169004/diff/1/lib/core/sequences.dart#newcode29 lib/core/sequences.dart:29: List result = new List(this.length); On 2012/10/17 11:06:45, Lasse ...
8 years, 2 months ago (2012-10-17 13:19:32 UTC) #7
Lasse Reichstein Nielsen
Now with changes actually uploaded. @Florian: Your objection really points to a weakness in this ...
8 years, 2 months ago (2012-10-17 14:42:13 UTC) #8
floitsch
LGTM, but wait for Stephen's OK. https://codereview.chromium.org/11169004/diff/10001/lib/core/sequences.dart File lib/core/sequences.dart (right): https://codereview.chromium.org/11169004/diff/10001/lib/core/sequences.dart#newcode186 lib/core/sequences.dart:186: throw new IllegalAccessException(); ...
8 years, 2 months ago (2012-10-17 21:40:00 UTC) #9
sra1
lgtm
8 years, 2 months ago (2012-10-18 06:13:24 UTC) #10
Lasse Reichstein Nielsen
8 years, 2 months ago (2012-10-18 07:58:55 UTC) #11
https://codereview.chromium.org/11169004/diff/10001/lib/core/sequences.dart
File lib/core/sequences.dart (right):

https://codereview.chromium.org/11169004/diff/10001/lib/core/sequences.dart#n...
lib/core/sequences.dart:186: throw new IllegalAccessException();
Beats me. Selective blindness? Scrolled below the fold of my screen?

Powered by Google App Engine
This is Rietveld 408576698