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

Issue 1151523002: VM-internalize the default Map implementation. (Closed)

Created:
5 years, 7 months ago by koda
Modified:
5 years, 6 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Ivan Posva
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM-internalize the default Map implementation. Make the compact linked hash map, which is the default implementation for Map (including map literals), a VM-internal class. This makes it easy to have more efficient serialization of maps (although for now, the implementation is straight-forward). Refactor the compact hash class hierarchy to enable the VM-internal class and the rest (also the Set classes) to share a maximal amount of code, by using two different bases for implicit/explicit fields. Remove existing proof-of-concept, C++-based internal VM-class. BUG=http://dartbug.com/22982 R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/ea46192ca34bdef17fc0e9f8316cfd83899443be

Patch Set 1 #

Patch Set 2 : Remove unused code, add comments. #

Patch Set 3 : Ready for review. #

Total comments: 10

Patch Set 4 : Address review comments. #

Patch Set 5 : Add map serialization benchmark. #

Total comments: 3

Patch Set 6 : Fix fingerprints. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+491 lines, -368 lines) Patch
M runtime/lib/collection_patch.dart View 2 chunks +1 line, -8 lines 0 comments Download
M runtime/lib/collection_sources.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/lib/compact_hash.dart View 1 2 3 13 chunks +75 lines, -48 lines 0 comments Download
M runtime/lib/linked_hash_map.cc View 1 chunk +42 lines, -29 lines 0 comments Download
D runtime/lib/linked_hash_map.dart View 1 chunk +0 lines, -118 lines 0 comments Download
M runtime/vm/benchmark_test.cc View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +10 lines, -9 lines 0 comments Download
M runtime/vm/class_finalizer.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 2 chunks +72 lines, -0 lines 0 comments Download
M runtime/vm/method_recognizer.h View 1 2 3 4 5 2 chunks +22 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 3 chunks +92 lines, -48 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 5 chunks +36 lines, -95 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 2 chunks +69 lines, -1 line 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 2 chunks +17 lines, -9 lines 0 comments Download
M runtime/vm/snapshot.h View 1 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
koda
5 years, 7 months ago (2015-05-20 13:28:39 UTC) #2
siva
https://codereview.chromium.org/1151523002/diff/40001/runtime/lib/compact_hash.dart File runtime/lib/compact_hash.dart (right): https://codereview.chromium.org/1151523002/diff/40001/runtime/lib/compact_hash.dart#newcode74 runtime/lib/compact_hash.dart:74: } I think leaving the fields in here commented ...
5 years, 7 months ago (2015-05-22 16:27:11 UTC) #3
koda
PTAL https://codereview.chromium.org/1151523002/diff/40001/runtime/lib/compact_hash.dart File runtime/lib/compact_hash.dart (right): https://codereview.chromium.org/1151523002/diff/40001/runtime/lib/compact_hash.dart#newcode74 runtime/lib/compact_hash.dart:74: } On 2015/05/22 16:27:11, siva wrote: > I ...
5 years, 7 months ago (2015-05-26 12:22:05 UTC) #4
koda
Also added a map serialization benchmark to guide future improvements to the format. Even with ...
5 years, 7 months ago (2015-05-26 13:25:09 UTC) #5
koda
On 2015/05/26 13:25:09, koda wrote: > Also added a map serialization benchmark to guide future ...
5 years, 7 months ago (2015-05-27 21:15:55 UTC) #6
siva
lgtm https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc#newcode19541 runtime/vm/object.cc:19541: #endif Why not move this to platform/globals.h
5 years, 7 months ago (2015-05-27 22:06:02 UTC) #7
koda
Committed patchset #6 (id:100001) manually as ea46192ca34bdef17fc0e9f8316cfd83899443be (presubmit successful).
5 years, 6 months ago (2015-05-28 16:33:03 UTC) #8
koda
https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc#newcode19541 runtime/vm/object.cc:19541: #endif On 2015/05/27 22:06:02, siva wrote: > Why not ...
5 years, 6 months ago (2015-05-28 16:34:38 UTC) #9
siva
5 years, 6 months ago (2015-05-28 17:55:13 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/1151523002/diff/80001/runtime/vm/object.cc#ne...
runtime/vm/object.cc:19541: #endif
On 2015/05/28 16:34:38, koda wrote:
> On 2015/05/27 22:06:02, siva wrote:
> > Why not move this to platform/globals.h
> > 
> 
> It seems unlikely it will be used anywhere but here and the corresponding Dart
> code. My unit test ensures they agree.

We would like to keep the code in these files clean without cluttering it with
these #if defined() stuff and hence the suggestion.

Powered by Google App Engine
This is Rietveld 408576698