From d141919a54533ea7f8b805e8a9ca6afc7bf86755 Mon Sep 17 00:00:00 2001 From: Kunshan Wang Date: Tue, 21 Jun 2022 16:11:26 +0800 Subject: [PATCH 1/3] Update for upstream PR mmtk/mmtk-core#611 Notably, mmtk-v8 no longer mentions ProcessEdgesWork. --- mmtk/Cargo.toml | 3 ++- mmtk/src/collection.rs | 8 +++++--- mmtk/src/scanning.rs | 11 ++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index fd8c353..7a8d27d 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -27,9 +27,10 @@ log = "*" # - 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 = "f78de4ed8ffd6f834c6c3d3a0bde0a651cc33f2b" } +#mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "f78de4ed8ffd6f834c6c3d3a0bde0a651cc33f2b" } # Uncomment the following and fix the path to mmtk-core to build locally # mmtk = { path = "../repos/mmtk-core" } +mmtk = { git = "https://github.com/wks/mmtk-core.git", branch = "api-no-process-edges-work" } [features] default = ["mmtk/code_space", "mmtk/ro_space"] diff --git a/mmtk/src/collection.rs b/mmtk/src/collection.rs index f0fdb95..edd7c68 100644 --- a/mmtk/src/collection.rs +++ b/mmtk/src/collection.rs @@ -1,7 +1,6 @@ -use mmtk::scheduler::ProcessEdgesWork; use mmtk::util::opaque_pointer::*; use mmtk::vm::{Collection, GCThreadContext}; -use mmtk::MutatorContext; +use mmtk::{Mutator, MutatorContext}; use UPCALLS; use V8; @@ -12,7 +11,10 @@ const GC_THREAD_KIND_WORKER: libc::c_int = 1; pub struct VMCollection {} impl Collection for VMCollection { - fn stop_all_mutators>(tls: VMWorkerThread) { + fn stop_all_mutators(tls: VMWorkerThread, _mutator_visitor: F) + where + F: FnMut(&'static mut Mutator), + { unsafe { ((*UPCALLS).stop_all_mutators)(tls); } diff --git a/mmtk/src/scanning.rs b/mmtk/src/scanning.rs index a7d4e5d..c32977d 100644 --- a/mmtk/src/scanning.rs +++ b/mmtk/src/scanning.rs @@ -1,7 +1,7 @@ -use mmtk::scheduler::ProcessEdgesWork; use mmtk::util::opaque_pointer::*; use mmtk::util::ObjectReference; use mmtk::vm::EdgeVisitor; +use mmtk::vm::RootsWorkFactory; use mmtk::vm::Scanning; use mmtk::Mutator; use V8; @@ -24,18 +24,19 @@ impl Scanning for VMScanning { unimplemented!() } - fn scan_thread_roots>() { + fn scan_thread_roots(_tls: VMWorkerThread, _factory: Box) { unimplemented!() } - fn scan_thread_root>( - _mutator: &'static mut Mutator, + fn scan_thread_root( _tls: VMWorkerThread, + _mutator: &'static mut Mutator, + _factory: Box, ) { unimplemented!() } - fn scan_vm_specific_roots>() { + fn scan_vm_specific_roots(_tls: VMWorkerThread, _factory: Box) { unimplemented!() } From 20d15055c966a676bec464b0cf90e7d1de54cb80 Mon Sep 17 00:00:00 2001 From: Kunshan Wang Date: Fri, 24 Jun 2022 13:27:46 +0800 Subject: [PATCH 2/3] Use impl instead of Box --- mmtk/src/scanning.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mmtk/src/scanning.rs b/mmtk/src/scanning.rs index c32977d..2f110d8 100644 --- a/mmtk/src/scanning.rs +++ b/mmtk/src/scanning.rs @@ -24,19 +24,19 @@ impl Scanning for VMScanning { unimplemented!() } - fn scan_thread_roots(_tls: VMWorkerThread, _factory: Box) { + fn scan_thread_roots(_tls: VMWorkerThread, _factory: impl RootsWorkFactory) { unimplemented!() } fn scan_thread_root( _tls: VMWorkerThread, _mutator: &'static mut Mutator, - _factory: Box, + _factory: impl RootsWorkFactory, ) { unimplemented!() } - fn scan_vm_specific_roots(_tls: VMWorkerThread, _factory: Box) { + fn scan_vm_specific_roots(_tls: VMWorkerThread, _factory: impl RootsWorkFactory) { unimplemented!() } From 15bd1b03985f908b39609a490ea7afa3580a9074 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Tue, 5 Jul 2022 11:30:08 +1200 Subject: [PATCH 3/3] Update Cargo.toml --- mmtk/Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mmtk/Cargo.toml b/mmtk/Cargo.toml index c657a79..33a77e3 100644 --- a/mmtk/Cargo.toml +++ b/mmtk/Cargo.toml @@ -27,10 +27,9 @@ log = "*" # - 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 = "571a857b75e648ca4c711d56fbf400d99173398f" } +mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "f0fed5fc01438162115120c7551d4eb96e888bc2" } # Uncomment the following and fix the path to mmtk-core to build locally # mmtk = { path = "../repos/mmtk-core" } -mmtk = { git = "https://github.com/wks/mmtk-core.git", branch = "api-no-process-edges-work" } [features] default = ["mmtk/code_space", "mmtk/ro_space"]