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

Issue 12827018: Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables. (Closed)

Created:
7 years, 9 months ago by kasperl
Modified:
7 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables. I'll start refactoring the implementation to make it a bit more maintainable, but I wanted to get your first impressions. R=erikcorry@google.com,lrn@google.com,srdjan@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=20770

Patch Set 1 #

Patch Set 2 : Remove newlines. #

Patch Set 3 : Fix typo. #

Total comments: 17

Patch Set 4 : Prefer local variable. #

Total comments: 23

Patch Set 5 : Fixes. #

Total comments: 8

Patch Set 6 : Remove type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -183 lines) Patch
M pkg/unittest/test/matchers_test.dart View 3 chunks +6 lines, -5 lines 0 comments Download
A + runtime/lib/collection_patch.dart View 1 2 3 4 6 chunks +16 lines, -39 lines 0 comments Download
A + runtime/lib/collection_sources.gypi View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/bootstrap.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/bootstrap.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/vm.gypi View 1 2 3 4 6 chunks +43 lines, -0 lines 0 comments Download
A sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart View 1 2 3 4 5 1 chunk +356 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/core_patch.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/libraries.dart View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/collection/hash_map.dart View 1 2 3 4 1 chunk +14 lines, -98 lines 0 comments Download
M tests/corelib/map_keys_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/map_test.dart View 1 2 3 4 4 chunks +134 lines, -33 lines 0 comments Download
M tests/corelib/map_values_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
kasperl
7 years, 9 months ago (2013-03-22 10:47:32 UTC) #1
kasperl
I've hacked up a silly and small read/write benchmark for maps and for that this ...
7 years, 9 months ago (2013-03-22 11:34:33 UTC) #2
kasperl
After messing a bit with the benchmark to make it more reasonable (don't use consecutive ...
7 years, 9 months ago (2013-03-22 11:40:35 UTC) #3
erikcorry
Looking very promising. https://codereview.chromium.org/12827018/diff/3002/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart File sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart (right): https://codereview.chromium.org/12827018/diff/3002/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart#newcode9 sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart:9: // BUG(9368): We're currently unable to ...
7 years, 9 months ago (2013-03-22 12:59:24 UTC) #4
ahe
I have looked at sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart and the tests. Those parts, LGTM. I would suggest that ...
7 years, 9 months ago (2013-03-22 16:18:31 UTC) #5
kasperl
As I mentioned to Erik, this definitely needs a bit of refactoring and some more ...
7 years, 9 months ago (2013-03-22 16:27:31 UTC) #6
kasperl
... and I actually do have a few tests cooking with weird objects that return ...
7 years, 9 months ago (2013-03-22 16:28:51 UTC) #7
Ivan Posva
https://codereview.chromium.org/12827018/diff/7001/sdk/lib/collection/hash_map.dart File sdk/lib/collection/hash_map.dart (right): https://codereview.chromium.org/12827018/diff/7001/sdk/lib/collection/hash_map.dart#newcode26 sdk/lib/collection/hash_map.dart:26: external factory HashMap(); Why stop here? There are plenty ...
7 years, 9 months ago (2013-03-22 16:32:47 UTC) #8
kasperl
https://codereview.chromium.org/12827018/diff/7001/sdk/lib/collection/hash_map.dart File sdk/lib/collection/hash_map.dart (right): https://codereview.chromium.org/12827018/diff/7001/sdk/lib/collection/hash_map.dart#newcode26 sdk/lib/collection/hash_map.dart:26: external factory HashMap(); On 2013/03/22 16:32:47, Ivan Posva wrote: ...
7 years, 9 months ago (2013-03-22 16:36:01 UTC) #9
sra1
https://codereview.chromium.org/12827018/diff/3002/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart File sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart (right): https://codereview.chromium.org/12827018/diff/3002/sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart#newcode76 sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart:76: var hash = JS('num', 'Number(#)', key.hashCode); On 2013/03/22 12:59:24, ...
7 years, 9 months ago (2013-03-22 18:27:42 UTC) #10
kasperl
I've refactored the code quite a bit and changed the implementation to be patch methods ...
7 years, 8 months ago (2013-04-02 10:33:37 UTC) #11
erikcorry
LGTM Do we have a test that tests things still work with massive hashCode clashes? ...
7 years, 8 months ago (2013-04-02 11:20:09 UTC) #12
kasperl
Thanks for the review. I'll work on this some more when I start dealing with ...
7 years, 8 months ago (2013-04-02 11:42:07 UTC) #13
kasperl
7 years, 8 months ago (2013-04-02 11:51:58 UTC) #14
Message was sent while issue was closed.
Committed patchset #6 manually as r20770 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698