Skip to content

Commit

Permalink
Fix write barrier parameter type (#148)
Browse files Browse the repository at this point in the history
Upstream PR: mmtk/mmtk-core#1130

---------

Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
  • Loading branch information
wks and mmtkgc-bot authored Apr 30, 2024
1 parent 309a6ae commit 0d7950c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lazy_static = "1.1"
# - change branch
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev="a02803b4104519ff2289234101a2dd8ceedd1bc7" }
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "fea59e4f5cc6176093da1d8efa7d7b3b4b8d0fa7" }
# Uncomment the following to build locally
# mmtk = { path = "../repos/mmtk-core" }
log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"] }
Expand Down
9 changes: 5 additions & 4 deletions mmtk/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use libc::c_char;
use log::*;
use mmtk::memory_manager;
use mmtk::scheduler::GCWorker;
use mmtk::util::api_util::NullableObjectReference;
use mmtk::util::opaque_pointer::*;
use mmtk::util::{Address, ObjectReference, OpaquePointer};
use mmtk::AllocationSemantics;
Expand Down Expand Up @@ -395,7 +396,7 @@ fn set_side_log_bit_for_region(start: Address, size: usize) {
pub extern "C" fn mmtk_object_reference_write_post(
mutator: *mut Mutator<JuliaVM>,
src: ObjectReference,
target: ObjectReference,
target: NullableObjectReference,
) {
let mutator = unsafe { &mut *mutator };
memory_manager::object_reference_write_post(
Expand All @@ -404,23 +405,23 @@ pub extern "C" fn mmtk_object_reference_write_post(
crate::edges::JuliaVMEdge::Simple(mmtk::vm::edge_shape::SimpleEdge::from_address(
Address::ZERO,
)),
target,
target.into(),
)
}

#[no_mangle]
pub extern "C" fn mmtk_object_reference_write_slow(
mutator: &'static mut Mutator<JuliaVM>,
src: ObjectReference,
target: ObjectReference,
target: NullableObjectReference,
) {
use mmtk::MutatorContext;
mutator.barrier().object_reference_write_slow(
src,
crate::edges::JuliaVMEdge::Simple(mmtk::vm::edge_shape::SimpleEdge::from_address(
Address::ZERO,
)),
target,
target.into(),
);
}

Expand Down

0 comments on commit 0d7950c

Please sign in to comment.