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

Issue 10832199: Add a weak property type to the virtual machine. (Closed)

Created:
8 years, 4 months ago by cshapiro
Modified:
8 years, 4 months ago
Reviewers:
turnidge, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add a weak property type to the virtual machine. Weak properties are key-value pairs. The liveness of the key determines the liveness of the value. If the key is reachable the value is traced. However, if the key is unreachable, the value is subject to finalization. At present, the sole finalization action is clearing the key and value fields. However, it is possible to extend this to invoking callbacks or other techniques, as well as processing values in topological order. Committed: https://code.google.com/p/dart/source/detail?r=10867

Patch Set 1 #

Patch Set 2 : rebased #

Patch Set 3 : minor clean-up #

Total comments: 24

Patch Set 4 : address review comments #

Total comments: 1

Patch Set 5 : address final review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+534 lines, -7 lines) Patch
M runtime/vm/class_finalizer.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/gc_marker.h View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/gc_marker.cc View 1 2 3 4 6 chunks +55 lines, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 4 chunks +29 lines, -1 line 0 comments Download
M runtime/vm/object_store.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 1 chunk +246 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 7 chunks +41 lines, -2 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
M runtime/vm/scavenger.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/scavenger.cc View 1 2 3 4 7 chunks +59 lines, -1 line 0 comments Download
M runtime/vm/snapshot.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
cshapiro
8 years, 4 months ago (2012-08-08 18:09:07 UTC) #1
turnidge
I like the change. Some comments below. http://codereview.chromium.org/10832199/diff/5001/runtime/vm/gc_marker.cc File runtime/vm/gc_marker.cc (right): http://codereview.chromium.org/10832199/diff/5001/runtime/vm/gc_marker.cc#newcode7 runtime/vm/gc_marker.cc:7: #include <map> ...
8 years, 4 months ago (2012-08-09 18:34:34 UTC) #2
Ivan Posva
https://chromiumcodereview.appspot.com/10832199/diff/5001/runtime/vm/raw_object.h File runtime/vm/raw_object.h (right): https://chromiumcodereview.appspot.com/10832199/diff/5001/runtime/vm/raw_object.h#newcode188 runtime/vm/raw_object.h:188: kWatchedBit = 4, I was wondering whether you considered ...
8 years, 4 months ago (2012-08-14 00:26:39 UTC) #3
cshapiro
http://codereview.chromium.org/10832199/diff/5001/runtime/vm/gc_marker.cc File runtime/vm/gc_marker.cc (right): http://codereview.chromium.org/10832199/diff/5001/runtime/vm/gc_marker.cc#newcode152 runtime/vm/gc_marker.cc:152: } I am now using a multimap instead of ...
8 years, 4 months ago (2012-08-14 04:58:18 UTC) #4
Ivan Posva
http://codereview.chromium.org/10832199/diff/5001/runtime/vm/raw_object.h File runtime/vm/raw_object.h (right): http://codereview.chromium.org/10832199/diff/5001/runtime/vm/raw_object.h#newcode188 runtime/vm/raw_object.h:188: kWatchedBit = 4, On 2012/08/14 04:58:18, cshapiro wrote: > ...
8 years, 4 months ago (2012-08-14 15:23:36 UTC) #5
turnidge
8 years, 4 months ago (2012-08-16 23:31:46 UTC) #6
lgtm, one small comment.

https://chromiumcodereview.appspot.com/10832199/diff/5003/runtime/vm/scavenge...
File runtime/vm/scavenger.cc (right):

https://chromiumcodereview.appspot.com/10832199/diff/5003/runtime/vm/scavenge...
runtime/vm/scavenger.cc:125: if (raw_obj->IsWatched()) {
Comment here and in similar point in other file -- equal_range is not familiar
to me and probably others.

Powered by Google App Engine
This is Rietveld 408576698