Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Rust 1.83 #185

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

3 changes: 2 additions & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"]
# - change branch/rev
# - 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 = "c0f97884234b51b13c8ba5d1563a8e0f592d11c2" }
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "ac80c8de8ac551959839dfaa79e87c1a05a9e89c" }
# Uncomment the following to build locally - if you change the path locally, do not commit the change in a PR
# mmtk = { path = "../repos/mmtk-core" }

Expand All @@ -40,3 +40,4 @@ nogc = []
semispace = []
marksweep = []
malloc_marksweep = ["mmtk/malloc_mark_sweep"]
binding_side_ref_proc = []
2 changes: 1 addition & 1 deletion mmtk/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.77.0
1.83.0
6 changes: 0 additions & 6 deletions mmtk/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ pub extern "C" fn total_bytes() -> usize {
memory_manager::total_bytes(&SINGLETON)
}

#[no_mangle]
#[cfg(feature = "sanity")]
pub extern "C" fn scan_region() {
memory_manager::scan_region(&SINGLETON)
}

#[no_mangle]
pub extern "C" fn handle_user_collection_request(tls: VMMutatorThread) {
memory_manager::handle_user_collection_request::<JikesRVM>(&SINGLETON, tls);
Expand Down
2 changes: 1 addition & 1 deletion mmtk/src/jikesrvm_calls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn prepare_mutator(tls: VMWorkerThread, mutator_tls: VMMutatorThread) {
unsafe {
// asm! is not smart enough to figure out VMMutatorThread has repr(transparent) and
// therefore the same representation as a pointer.
let mutator_tls_usize = std::mem::transmute::<_, usize>(mutator_tls);
let mutator_tls_usize = std::mem::transmute::<VMMutatorThread, usize>(mutator_tls);
jtoc_call!(PREPARE_MUTATOR_METHOD_OFFSET, tls, mutator_tls_usize);
}
}
Expand Down
8 changes: 4 additions & 4 deletions mmtk/src/scan_boot_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ fn process_chunk(
/* enqueue the specified slot or slots */
debug_assert!(conversions::is_address_aligned(Address::from_usize(offset)));
let mut slot: Address = image_start + offset;
if cfg!(feature = "debug") {
if cfg!(debug_assertions) {
REFS.fetch_add(1, Ordering::Relaxed);
}

if !FILTER || slot.load::<Address>() > map_end {
if cfg!(feature = "debug") {
if cfg!(debug_assertions) {
ROOTS.fetch_add(1, Ordering::Relaxed);
}
report_slot(JikesRVMSlot::from_address(slot));
Expand All @@ -113,11 +113,11 @@ fn process_chunk(
offset += BYTES_IN_ADDRESS;
slot = image_start + offset;
debug_assert!(conversions::is_address_aligned(slot));
if cfg!(feature = "debug") {
if cfg!(debug_assertions) {
REFS.fetch_add(1, Ordering::Relaxed);
}
if !FILTER || slot.load::<Address>() > map_end {
if cfg!(feature = "debug") {
if cfg!(debug_assertions) {
ROOTS.fetch_add(1, Ordering::Relaxed);
}
// TODO: check_reference(slot) ?
Expand Down
2 changes: 1 addition & 1 deletion mmtk/src/tib_layout_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ pub const TIB_FIRST_VIRTUAL_METHOD_INDEX: usize =
* <li>fits into a PowerPC 16bit immediate operand</li>
* </ul>
*/
pub const NEEDS_DYNAMIC_LINK: isize = i16::min_value() as isize + 1;
pub const NEEDS_DYNAMIC_LINK: isize = i16::MIN as isize + 1;