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

Issue 1127533002: Add Map.unmodifiable constructor. (Closed)

Created:
5 years, 7 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Anders Johnsen, kasperl
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address comments, update documentation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -6 lines) Patch
M runtime/lib/core_patch.dart View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/lib/integers_patch.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/map_patch.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/constant_map.dart View 1 3 chunks +43 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/core_patch.dart View 1 2 chunks +7 lines, -0 lines 0 comments Download
M sdk/lib/core/map.dart View 1 1 chunk +17 lines, -1 line 0 comments Download

Messages

Total messages: 15 (4 generated)
Lasse Reichstein Nielsen
5 years, 7 months ago (2015-05-04 07:18:08 UTC) #2
Søren Gjesse
https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart File sdk/lib/core/map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newcode66 sdk/lib/core/map.dart:66: external factory Map.unmodifiable(Map other); Is UnmodifiableMapView used that much ...
5 years, 7 months ago (2015-05-05 01:51:12 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart File sdk/lib/core/map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newcode66 sdk/lib/core/map.dart:66: external factory Map.unmodifiable(Map other); This constructor, like List.unmodifable, is ...
5 years, 7 months ago (2015-05-05 05:09:40 UTC) #4
Lasse Reichstein Nielsen
5 years, 7 months ago (2015-05-07 10:06:49 UTC) #7
sra1
js_lib changes lgtm https://codereview.chromium.org/1127533002/diff/1/sdk/lib/_internal/compiler/js_lib/constant_map.dart File sdk/lib/_internal/compiler/js_lib/constant_map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/_internal/compiler/js_lib/constant_map.dart#newcode9 sdk/lib/_internal/compiler/js_lib/constant_map.dart:9: ConstantMapView(Map base) : super(base); indentation https://codereview.chromium.org/1127533002/diff/1/sdk/lib/_internal/compiler/js_lib/constant_map.dart#newcode14 ...
5 years, 7 months ago (2015-05-07 19:24:42 UTC) #8
Ivan Posva
-Ivan https://codereview.chromium.org/1127533002/diff/1/runtime/lib/core_patch.dart File runtime/lib/core_patch.dart (left): https://codereview.chromium.org/1127533002/diff/1/runtime/lib/core_patch.dart#oldcode11 runtime/lib/core_patch.dart:11: ? https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart File sdk/lib/core/map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newcode61 sdk/lib/core/map.dart:61: * ...
5 years, 7 months ago (2015-05-11 18:16:54 UTC) #9
Anders Johnsen
DBC https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart File sdk/lib/core/map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newcode61 sdk/lib/core/map.dart:61: * The created map iterates keys in the ...
5 years, 7 months ago (2015-05-11 18:51:08 UTC) #11
Søren Gjesse
lgtm We already have the List.unmodifiable constructor.
5 years, 7 months ago (2015-05-12 11:07:57 UTC) #12
Lasse Reichstein Nielsen
Committed patchset #2 (id:20001) manually as 45733 (presubmit successful).
5 years, 7 months ago (2015-05-12 11:09:46 UTC) #13
Lasse Reichstein Nielsen
https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart File sdk/lib/core/map.dart (right): https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newcode61 sdk/lib/core/map.dart:61: * The created map iterates keys in the same ...
5 years, 7 months ago (2015-05-13 11:18:59 UTC) #14
Lasse Reichstein Nielsen
5 years, 7 months ago (2015-05-13 11:18:59 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart
File sdk/lib/core/map.dart (right):

https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newco...
sdk/lib/core/map.dart:61: * The created map iterates keys in the same order as
[other].
This can probably still be written a little better, just to be on the safe side.

The intend is that:
- the created map has a fixed iteration order.
- that iteration order matches an iteration order of the input map.
We only iterate the input map once, so if it changes iteration order, that's not
being tracked. It shouldn't change, but then, a lot of things shouldn't happen.

https://codereview.chromium.org/1127533002/diff/1/sdk/lib/core/map.dart#newco...
sdk/lib/core/map.dart:64: * except that the map returned by this constructor
diallows modification.
On 2015/05/07 19:24:42, sra1 wrote:
> disallows
> or
> does not allow
> or
> is not modifiable.

Done.

Powered by Google App Engine
This is Rietveld 408576698