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

Issue 2960783002: Revert "special-case ListMixin.setRange from same list" (Closed)

Created:
3 years, 5 months ago by sra1
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Revert "special-case ListMixin.setRange from same list" This reverts commit 001ce2aad76bf0a4af12bfa5159812c56b8cce49. TBR=lrn@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/e97610ec38d8499362308c5f06a7b54ac044ef21

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -21 lines) Patch
M sdk/lib/collection/list.dart View 4 chunks +12 lines, -21 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
sra1
Committed patchset #1 (id:1) manually as e97610ec38d8499362308c5f06a7b54ac044ef21 (presubmit successful).
3 years, 5 months ago (2017-06-26 23:44:55 UTC) #2
sra1
On 2017/06/26 23:44:55, sra1 wrote: > Committed patchset #1 (id:1) manually as > e97610ec38d8499362308c5f06a7b54ac044ef21 (presubmit ...
3 years, 5 months ago (2017-06-27 00:14:26 UTC) #3
sra1
3 years, 5 months ago (2017-06-27 02:21:25 UTC) #4
Message was sent while issue was closed.
On 2017/06/27 00:14:26, sra1 wrote:
> On 2017/06/26 23:44:55, sra1 wrote:
> > Committed patchset #1 (id:1) manually as
> > e97610ec38d8499362308c5f06a7b54ac044ef21 (presubmit successful).
> 
> There were two problems, which show up with NodeList:
> 
>  1. Caching of length is wrong for Nodelist where the length can change when
an
> element is moved within the list by assignment.
>  2. setRange on some classes throws an exception and this is necessary for
> correct behaviour, i.e. to prevent modification of fixed-length and immutable
> lists.
> 
> It is hard to see how to get around #2, since there is no public API on List
to
> test for fixed length or immutability.
> 
> The benefits of this change were:
> 
>  (a) reduced checking since [start, end) bounds were correct by construction
>  (b) better dart2js tree-shaking since setRange was not called from mixin
code,
> preventing pulling in of all List setRange methods.
> 
> I think we have to abandon this approach and its benefits until there are List
> APIs for testing fixed-length and immutability.

On further investigation, this is a bug on _ChildNodeListLazy - it is missing
removeRange.
I will fix this and retry.

Powered by Google App Engine
This is Rietveld 408576698