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

Issue 11567018: Get rid of the polyfill identity set implementation in favour of a (Closed)

Created:
8 years ago by Alan Knight
Modified:
8 years ago
Reviewers:
Jennifer Messerly
CC:
reviews_dartlang.org, justinfagnani, dgrove
Visibility:
Public.

Description

Get rid of the polyfill identity set implementation in favour of a mock map that does linear search. At the moment, this is actually competitively fast on the VM because hashCode for objects that don't implement it is extremely slow. And it doesn't suffer from needing to be updated when the core changes. Should still be removed once there's identity map support. BUG=

Patch Set 1 #

Patch Set 2 : A bit more polyfill that can be removed with this change. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -94 lines) Patch
M pkg/serialization/lib/serialization.dart View 1 2 chunks +1 line, -2 lines 0 comments Download
M pkg/serialization/lib/src/basic_rule.dart View 1 1 chunk +0 lines, -3 lines 0 comments Download
M pkg/serialization/lib/src/mirrors_helpers.dart View 1 1 chunk +1 line, -14 lines 0 comments Download
M pkg/serialization/lib/src/reader_writer.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/serialization/lib/src/serialization_helpers.dart View 3 chunks +69 lines, -28 lines 2 comments Download
M pkg/serialization/lib/src/serialization_rule.dart View 1 chunk +0 lines, -5 lines 0 comments Download
A + pkg/serialization/test/polyfill_identity_map_test.dart View 2 chunks +10 lines, -1 line 0 comments Download
D pkg/serialization/test/polyfill_identity_set_test.dart View 1 chunk +0 lines, -39 lines 0 comments Download
M pkg/serialization/test/serialization_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Alan Knight
8 years ago (2012-12-13 18:52:23 UTC) #1
Jennifer Messerly
lgtm https://chromiumcodereview.appspot.com/11567018/diff/2001/pkg/serialization/lib/src/serialization_helpers.dart File pkg/serialization/lib/src/serialization_helpers.dart (right): https://chromiumcodereview.appspot.com/11567018/diff/2001/pkg/serialization/lib/src/serialization_helpers.dart#newcode239 pkg/serialization/lib/src/serialization_helpers.dart:239: keys = <K>[]; perhaps: keys.clear(); values.clear(); ? then ...
8 years ago (2012-12-17 19:29:52 UTC) #2
Alan Knight
8 years ago (2012-12-17 21:15:26 UTC) #3
Committed as https://codereview.chromium.org/11613005

https://chromiumcodereview.appspot.com/11567018/diff/2001/pkg/serialization/l...
File pkg/serialization/lib/src/serialization_helpers.dart (right):

https://chromiumcodereview.appspot.com/11567018/diff/2001/pkg/serialization/l...
pkg/serialization/lib/src/serialization_helpers.dart:239: keys = <K>[];
On 2012/12/17 19:29:53, John Messerly wrote:
> perhaps:
> 
> keys.clear();
> values.clear(); ?
> 
> then keys/values can be final

Nice. Done.

Powered by Google App Engine
This is Rietveld 408576698