Skip to content

Move to Rust 1.83 #118

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

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 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 @@ -37,7 +37,7 @@ features = ["is_mmtk_object", "object_pinning", "sticky_immix_non_moving_nursery

# Uncomment the following lines to use mmtk-core from the official repository.
git = "https://github.com/mmtk/mmtk-core.git"
rev = "e8ff7c63754a385047c4f1066af37a7b7ca1cd9d"
rev = "ec745353a8de72b645613e0fef3ab7f5f1ad9bd1"

# Uncomment the following line to use mmtk-core from a local repository.
#path = "../../mmtk-core"
Expand Down
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
4 changes: 2 additions & 2 deletions mmtk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern crate log;
extern crate probe;

use std::collections::HashSet;
use std::panic::PanicInfo;
use std::panic::PanicHookInfo;
use std::sync::Mutex;
use std::thread::ThreadId;

Expand Down Expand Up @@ -95,7 +95,7 @@ pub(crate) fn is_gc_thread(thread_id: ThreadId) -> bool {
gc_threads.contains(&thread_id)
}

fn handle_gc_thread_panic(panic_info: &PanicInfo) {
fn handle_gc_thread_panic(panic_info: &PanicHookInfo) {
eprintln!("ERROR: An MMTk GC thread panicked. This is a bug.");
eprintln!("{panic_info}");

Expand Down
30 changes: 17 additions & 13 deletions mmtk/src/weak_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,23 @@ fn general_update_weak_table(getter: extern "C" fn() -> *mut st_table, cleaner:
probe!(mmtk_ruby, weak_table_size_change, old_size, new_size);
}

define_global_table_processor!(UpdateFrozenStringsTable, {
general_update_weak_table(
upcalls().get_frozen_strings_table,
upcalls().update_frozen_strings_table,
);
});
#[allow(dead_code)]
mod unused {
use super::*;
define_global_table_processor!(UpdateFrozenStringsTable, {
general_update_weak_table(
upcalls().get_frozen_strings_table,
upcalls().update_frozen_strings_table,
);
});

define_global_table_processor!(UpdateGlobalSymbolsTable, {
general_update_weak_table(
upcalls().get_global_symbols_table,
upcalls().update_global_symbols_table,
);
});
}

define_global_table_processor!(UpdateFinalizerAndObjIdTables, {
let finalizer_table = (upcalls().get_finalizer_table)();
Expand Down Expand Up @@ -336,13 +347,6 @@ define_global_table_processor!(UpdateFinalizerAndObjIdTables, {
);
});

define_global_table_processor!(UpdateGlobalSymbolsTable, {
general_update_weak_table(
upcalls().get_global_symbols_table,
upcalls().update_global_symbols_table,
);
});

define_global_table_processor!(UpdateOverloadedCmeTable, {
general_update_weak_table(
upcalls().get_overloaded_cme_table,
Expand Down