Skip to content

Commit

Permalink
Move to Rust 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon committed Jan 6, 2025
1 parent 71d2a58 commit de79af2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 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.

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;

0 comments on commit de79af2

Please sign in to comment.