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

Issue 12089023: Don't use ReversedListView from outside core and collection. (Closed)

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

Description

Don't use ReversedListView from outside core and collection. Committed: https://code.google.com/p/dart/source/detail?r=17772

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fix dart2js. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -180 lines) Patch
M samples/swarm/swarm_ui_lib/observable/observable.dart View 2 chunks +3 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 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/html/dart2js/html_dart2js.dart View 36 chunks +108 lines, -72 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 36 chunks +108 lines, -72 lines 0 comments Download
M sdk/lib/html/html_common/filtered_element_list.dart View 1 chunk +1 line, -2 lines 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 6 chunks +18 lines, -12 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 6 chunks +18 lines, -12 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 2 chunks +6 lines, -4 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 chunk +3 lines, -2 lines 0 comments Download
M tools/dom/templates/immutable_list_mixin.darttemplate View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
ReversedListView lives in collection-dev and is hence only visible to core and collection.
7 years, 10 months ago (2013-01-28 21:31:32 UTC) #1
Lasse Reichstein Nielsen
Since other libraries imports collection-dev too (because I told them to when I used the ...
7 years, 10 months ago (2013-01-29 08:11:22 UTC) #2
floitsch
7 years, 10 months ago (2013-01-29 15:41:07 UTC) #3
https://codereview.chromium.org/12089023/diff/1/samples/swarm/swarm_ui_lib/ob...
File samples/swarm/swarm_ui_lib/observable/observable.dart (right):

https://codereview.chromium.org/12089023/diff/1/samples/swarm/swarm_ui_lib/ob...
samples/swarm/swarm_ui_lib/observable/observable.dart:8: import
'dart:collection-dev';
On 2013/01/29 08:11:22, Lasse Reichstein Nielsen wrote:
> But collections-dev is imported here, so why shouldn't it work?

It shouldn't. I will prepare to remove it.

https://codereview.chromium.org/12089023/diff/1/samples/swarm/swarm_ui_lib/ob...
samples/swarm/swarm_ui_lib/observable/observable.dart:166: List<T> get reversed
=> _internal.reversed;
On 2013/01/29 08:11:22, Lasse Reichstein Nielsen wrote:
> That works, but only because you can't assign through the reversed list.

Should be ok then. If we change that behavior, we shouldn't forget to change it
here. Even if we forget, it should not be a big problem, since Swarm doesn't use
"reversed".

https://codereview.chromium.org/12089023/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/lib/js_array.dart (right):

https://codereview.chromium.org/12089023/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/lib/js_array.dart:225: List<E> get
reversed => IterableMixinWorkaround.reversed(this);
On 2013/01/29 08:11:22, Lasse Reichstein Nielsen wrote:
> The interceptor.dart library imports collections-dev, so again this is not
> necessary.

It shouldn't.

https://codereview.chromium.org/12089023/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/lib/js_array.dart:225: List<E> get
reversed => IterableMixinWorkaround.reversed(this);
On 2013/01/29 08:11:22, Lasse Reichstein Nielsen wrote:
> Should't it be ".reversedList"?

Done.

Powered by Google App Engine
This is Rietveld 408576698