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

Issue 12086062: Rename mappedBy to map. (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

Rename mappedBy to map. Retain a deprecated mappedBy for now. Change return type of mappedBy, skip and take on List to Iterable. BUG= http://dartbug.com/8063 BUG= http://dartbug.com/8064 BUG= http://dartbug.com/6739 BUG= http://dartbug.com/7982 Committed: https://code.google.com/p/dart/source/detail?r=17899

Patch Set 1 #

Total comments: 29

Patch Set 2 : Address comments #

Patch Set 3 : Undo change to test-script. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+823 lines, -456 lines) Patch
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java View 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/http/lib/src/utils.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/intl/test/date_time_format_http_request_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/intl/test/date_time_format_local_test_stub.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/intl/test/date_time_format_test_core.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/oauth2/lib/src/utils.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/path/lib/path.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/serialization/lib/src/basic_rule.dart View 3 chunks +6 lines, -6 lines 0 comments Download
M pkg/serialization/lib/src/format.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/serialization/lib/src/reader_writer.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/serialization/lib/src/serialization_helpers.dart View 4 chunks +6 lines, -6 lines 0 comments Download
M pkg/serialization/lib/src/serialization_rule.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/serialization/test/serialization_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/unittest/lib/compact_vm_config.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/unittest/lib/src/config.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/yaml/lib/model.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M pkg/yaml/lib/visitor.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/yaml/lib/yaml.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/yaml/lib/yaml_map.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/array.dart View 1 9 chunks +16 lines, -6 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 3 chunks +6 lines, -2 lines 0 comments Download
M runtime/lib/growable_array.dart View 1 3 chunks +6 lines, -2 lines 0 comments Download
M samples/newissues/newissues.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/DataSource.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/layout/GridLayout.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M samples/swarm/swarm_ui_lib/observable/observable.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M samples/third_party/dromaeo/Suites.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js/nodes.dart View 2 chunks +2 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/constant_map.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 3 chunks +6 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/dartdoc/lib/dartdoc.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/async/stream.dart View 1 1 chunk +8 lines, -1 line 0 comments Download
M sdk/lib/collection/collections.dart View 1 4 chunks +11 lines, -4 lines 0 comments Download
M sdk/lib/collection/maps.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection_dev/list.dart View 1 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/core/iterable.dart View 2 chunks +9 lines, -2 lines 0 comments Download
M sdk/lib/core/list.dart View 1 1 chunk +0 lines, -32 lines 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 77 chunks +254 lines, -108 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 77 chunks +254 lines, -108 lines 0 comments Download
M sdk/lib/html/html_common/filtered_element_list.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 12 chunks +42 lines, -18 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 1 12 chunks +42 lines, -18 lines 0 comments Download
M tests/compiler/dart2js/type_checker_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/iterable_join_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/iterable_length_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/iterable_mapping_test.dart View 1 chunk +17 lines, -23 lines 0 comments Download
M tests/corelib/list_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/queue_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/reg_exp_all_matches_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/set_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/html/element_classes_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/html/element_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/html/streams_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/stream_controller_async_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/stream_controller_test.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M tests/lib/async/stream_from_iterable_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M tools/dom/src/CssClassSet.dart View 1 2 chunks +3 lines, -1 line 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 6 chunks +14 lines, -6 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 3 chunks +6 lines, -2 lines 0 comments Download
M tools/dom/templates/immutable_list_mixin.darttemplate View 1 2 chunks +7 lines, -3 lines 0 comments Download
M utils/pub/command_lish.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/entrypoint.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M utils/pub/hosted_source.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/io.dart View 1 4 chunks +4 lines, -4 lines 0 comments Download
M utils/pub/utils.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/validator.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M utils/pub/validator/directory.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/validator/lib.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/validator/license.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/validator/name.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/version.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/version_solver.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M utils/tests/archive/reader_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/tests/pub/command_line_config.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M utils/tests/pub/test_pub.dart View 1 8 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-01-30 13:47:38 UTC) #1
floitsch
LGTM! (once map returns an Iterable and not a List). https://codereview.chromium.org/12086062/diff/1/pkg/yaml/lib/yaml.dart File pkg/yaml/lib/yaml.dart (right): https://codereview.chromium.org/12086062/diff/1/pkg/yaml/lib/yaml.dart#newcode63 ...
7 years, 10 months ago (2013-01-30 14:48:44 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/12086062/diff/1/runtime/lib/array.dart File runtime/lib/array.dart (right): https://codereview.chromium.org/12086062/diff/1/runtime/lib/array.dart#newcode101 runtime/lib/array.dart:101: Iterable map(f(E element)) { On 2013/01/30 14:48:44, floitsch wrote: ...
7 years, 10 months ago (2013-01-30 16:58:01 UTC) #3
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-01-31 11:33:48 UTC) #4
https://codereview.chromium.org/12086062/diff/1/pkg/yaml/lib/yaml.dart
File pkg/yaml/lib/yaml.dart (right):

https://codereview.chromium.org/12086062/diff/1/pkg/yaml/lib/yaml.dart#newcode63
pkg/yaml/lib/yaml.dart:63: return new _Parser(yaml).l_yamlStream().map((doc) =>
On 2013/01/30 14:48:44, floitsch wrote:
> not your code, and really a nit, but I would prefer:
>       .l_yamlStream()
>   .map(...)
>   .toList();

Done.

https://codereview.chromium.org/12086062/diff/1/runtime/lib/array.dart
File runtime/lib/array.dart (right):

https://codereview.chromium.org/12086062/diff/1/runtime/lib/array.dart#newcod...
runtime/lib/array.dart:101: Iterable map(f(E element)) {
Ok, changed all List.mappedBy implementations to return List, and all List.map
implementations to return a non-List Iterable.

https://codereview.chromium.org/12086062/diff/1/runtime/lib/array.dart#newcod...
runtime/lib/array.dart:329: Iterable map(f(E element)) {
On 2013/01/30 14:48:44, floitsch wrote:
> ditto.

Done.

https://codereview.chromium.org/12086062/diff/1/runtime/lib/byte_array.dart
File runtime/lib/byte_array.dart (right):

https://codereview.chromium.org/12086062/diff/1/runtime/lib/byte_array.dart#n...
runtime/lib/byte_array.dart:232: Iterable map(f(int element)) {
Now returns a non-List iterable.

https://codereview.chromium.org/12086062/diff/1/runtime/lib/growable_array.dart
File runtime/lib/growable_array.dart (right):

https://codereview.chromium.org/12086062/diff/1/runtime/lib/growable_array.da...
runtime/lib/growable_array.dart:246: return
IterableMixinWorkaround.mappedByList(this, f);
On 2013/01/30 14:48:44, floitsch wrote:
> should return an Iterable.

Done.

https://codereview.chromium.org/12086062/diff/1/samples/swarm/swarm_ui_lib/ob...
File samples/swarm/swarm_ui_lib/observable/observable.dart (right):

https://codereview.chromium.org/12086062/diff/1/samples/swarm/swarm_ui_lib/ob...
samples/swarm/swarm_ui_lib/observable/observable.dart:287: Iterable mappedBy(f(T
element)) => map(f);
On 2013/01/30 14:48:44, floitsch wrote:
> forward to _internal.mappedBy(f).
> This way you don't need to care.

Done.

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

https://codereview.chromium.org/12086062/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/lib/constant_map.dart:38: //
TODO(floitsch): don't wrap the map twice.
On 2013/01/30 14:48:44, floitsch wrote:
> Now that map returns an Iterable you can just return _keys.map(...) and remove
> the TODO.

Done.

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

https://codereview.chromium.org/12086062/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/lib/js_array.dart:88: return
IterableMixinWorkaround.mappedByList(this, f);
On 2013/01/30 14:48:44, floitsch wrote:
> should return an Iterable.

Done.

https://codereview.chromium.org/12086062/diff/1/sdk/lib/async/stream.dart
File sdk/lib/async/stream.dart (right):

https://codereview.chromium.org/12086062/diff/1/sdk/lib/async/stream.dart#new...
sdk/lib/async/stream.dart:141: Iterable mappedBy(f(E element)) => map(f);
On 2013/01/30 14:48:44, floitsch wrote:
> Stream mappedBy.

Done.

https://codereview.chromium.org/12086062/diff/1/sdk/lib/collection/collection...
File sdk/lib/collection/collections.dart (right):

https://codereview.chromium.org/12086062/diff/1/sdk/lib/collection/collection...
sdk/lib/collection/collections.dart:316: static Iterable mappedByList(List list,
f(var element)) {
On 2013/01/30 14:48:44, floitsch wrote:
> Add a static Iterable map(Iterable, f) and use that for the new 'map'
functions.

Done.

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/html/impl...
File tools/dom/templates/html/impl/impl_Element.darttemplate (right):

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/html/impl...
tools/dom/templates/html/impl/impl_Element.darttemplate:64: Iterable
map(f(Element element)) {
On 2013/01/30 14:48:44, floitsch wrote:
> should return an Iterable.

Done.

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/html/impl...
tools/dom/templates/html/impl/impl_Element.darttemplate:279: Iterable
map(f(Element element)) {
On 2013/01/30 14:48:44, floitsch wrote:
> should return an Iterable.

Done.

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/html/impl...
File tools/dom/templates/html/impl/impl_Node.darttemplate (right):

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/html/impl...
tools/dom/templates/html/impl/impl_Node.darttemplate:141: Iterable map(f(Node
element)) {
On 2013/01/30 14:48:44, floitsch wrote:
> should return an iterable.

Done.

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/immutable...
File tools/dom/templates/immutable_list_mixin.darttemplate (right):

https://codereview.chromium.org/12086062/diff/1/tools/dom/templates/immutable...
tools/dom/templates/immutable_list_mixin.darttemplate:32: Iterable map(f($E
element)) =>
On 2013/01/30 14:48:44, floitsch wrote:
> should return an iterable.

Done.

Powered by Google App Engine
This is Rietveld 408576698