mmtk / mmtk-core

Memory Management ToolKit
https://www.mmtk.io
Other
379 stars 69 forks source link

Fix compiler errors and warnings for Rust 1.78.0 #1132

Closed wks closed 6 months ago

wks commented 6 months ago

ScanObjectsWork::make_another is unused. It was used when ScanObjectsWork was used for scanning node roots. Now that node roots are scanned by the dedicated ProcessRootNode work packet, we can remove it.

WorkCounter::get_base_mut is never used. All derived counters use merge_val to update all fields at the same time.

We use Box::as_ref() to get the reference to its underlying element. It fixes a compilation error related to CommonFreeListPageResource. But we should eventually remove CommonFreeListPageResource completely as it is a workaround for mimicking the legacy design from JikesRVM that allow VMMap to enumerate and patch existing FreeListPageResource instances by registering them in a global list, which is not idiomatic in Rust. See https://github.com/mmtk/mmtk-core/pull/934 and https://github.com/mmtk/mmtk-core/pull/953.