diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-10-21 17:21:59 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-10-21 17:21:59 -0700 |
| commit | 739b1b5b53729085f91fbce0fa9fb0530c9d56ee (patch) | |
| tree | f684850ba4443574782fc13577a544c8bacf5737 /src/rt/rust_cc.cpp | |
| parent | 020726c9816ff47fcdc16877a9256e5a765d6315 (diff) | |
| download | rust-739b1b5b53729085f91fbce0fa9fb0530c9d56ee.tar.gz rust-739b1b5b53729085f91fbce0fa9fb0530c9d56ee.zip | |
Cycle-collect objects
Diffstat (limited to 'src/rt/rust_cc.cpp')
| -rw-r--r-- | src/rt/rust_cc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rt/rust_cc.cpp b/src/rt/rust_cc.cpp index 8982a4a312e..83ee0cd21e8 100644 --- a/src/rt/rust_cc.cpp +++ b/src/rt/rust_cc.cpp @@ -104,7 +104,10 @@ class irc : public shape::data<irc,shape::ptr> { } void walk_obj() { - shape::data<irc,shape::ptr>::walk_obj_contents(dp); + dp += sizeof(void *); // skip vtable + uint8_t *box_ptr = shape::bump_dp<uint8_t *>(dp); + shape::ptr ref_count_dp(box_ptr); + maybe_record_irc(ref_count_dp); } void walk_res(const shape::rust_fn *dtor, unsigned n_params, @@ -491,7 +494,7 @@ class sweep : public shape::data<sweep,shape::ptr> { } void walk_obj() { - shape::data<sweep,shape::ptr>::walk_obj_contents(dp); + return; } void walk_res(const shape::rust_fn *dtor, unsigned n_params, |
