Skip to content

Commit 94ae9c1

Browse files
wksudesou
andauthored
Upstream API change (#29)
Related PR: mmtk/mmtk-core#897 Co-authored-by: Eduardo Souza <[email protected]>
1 parent f767db7 commit 94ae9c1

File tree

3 files changed

+63
-93
lines changed

3 files changed

+63
-93
lines changed

mmtk/Cargo.lock

Lines changed: 59 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/src/binding.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::sync::Mutex;
44

55
use libc::c_void;
66
use mmtk::util::ObjectReference;
7-
use mmtk::{memory_manager, MMTK};
7+
use mmtk::MMTK;
88

99
use crate::abi;
1010
use crate::abi::RubyBindingOptions;
@@ -35,7 +35,6 @@ pub struct RubyBinding {
3535
pub plan_name: Mutex<Option<CString>>,
3636
pub weak_proc: WeakProcessor,
3737
pub ppp_registry: PPPRegistry,
38-
pub(crate) pinned_roots: Mutex<Vec<ObjectReference>>,
3938
pub(crate) moved_givtbl: Mutex<HashMap<ObjectReference, MovedGIVTblEntry>>,
4039
}
4140

@@ -58,7 +57,6 @@ impl RubyBinding {
5857
plan_name: Mutex::new(None),
5958
weak_proc: WeakProcessor::new(),
6059
ppp_registry: PPPRegistry::new(),
61-
pinned_roots: Default::default(),
6260
moved_givtbl: Default::default(),
6361
}
6462
}
@@ -77,16 +75,4 @@ impl RubyBinding {
7775
}
7876
plan_name.as_deref().unwrap().as_ptr()
7977
}
80-
81-
pub(crate) fn unpin_pinned_roots(&self) {
82-
let mut pinned_roots = self
83-
.pinned_roots
84-
.try_lock()
85-
.expect("It is accessed during weak ref processing. Should have no race.");
86-
87-
for object in pinned_roots.drain(..) {
88-
let result = memory_manager::unpin_object::<Ruby>(object);
89-
debug_assert!(result);
90-
}
91-
}
9278
}

0 commit comments

Comments
 (0)