File tree Expand file tree Collapse file tree 4 files changed +231
-12
lines changed Expand file tree Collapse file tree 4 files changed +231
-12
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ log = "*"
2727# - change branch
2828# - change repo name
2929# But other changes including adding/removing whitespaces in commented lines may break the CI.
30- mmtk = { git = " https://github.com/mmtk/mmtk-core.git" , rev = " a96e8f991c91a81df51e7975849441f52fdbcdcc " }
30+ mmtk = { git = " https://github.com/mmtk/mmtk-core.git" , rev = " 76131c493be38e421f5fb157f9900f850584554f " }
3131# Uncomment the following and fix the path to mmtk-core to build locally
3232# mmtk = { path = "../repos/mmtk-core" }
3333
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use std::ptr::null_mut;
1010
1111use libc:: c_void;
1212use mmtk:: util:: opaque_pointer:: * ;
13+ use mmtk:: util:: Address ;
1314use mmtk:: util:: ObjectReference ;
1415use mmtk:: vm:: VMBinding ;
1516use mmtk:: MMTKBuilder ;
@@ -46,13 +47,21 @@ pub static mut UPCALLS: *const V8_Upcalls = null_mut();
4647#[ derive( Default ) ]
4748pub struct V8 ;
4849
50+ /// The edge type of V8.
51+ ///
52+ /// TODO: We start with Address to transition from the old API.
53+ /// We should define an edge type suitable for V8.
54+ pub type V8Edge = Address ;
55+
4956impl VMBinding for V8 {
5057 type VMObjectModel = object_model:: VMObjectModel ;
5158 type VMScanning = scanning:: VMScanning ;
5259 type VMCollection = collection:: VMCollection ;
5360 type VMActivePlan = active_plan:: VMActivePlan ;
5461 type VMReferenceGlue = reference_glue:: VMReferenceGlue ;
5562
63+ type VMEdge = V8Edge ;
64+
5665 const MAX_ALIGNMENT : usize = 32 ;
5766}
5867
Original file line number Diff line number Diff line change @@ -5,14 +5,15 @@ use mmtk::vm::RootsWorkFactory;
55use mmtk:: vm:: Scanning ;
66use mmtk:: Mutator ;
77use V8 ;
8+ use V8Edge ;
89
910pub struct VMScanning { }
1011
1112impl Scanning < V8 > for VMScanning {
1213 const SCAN_MUTATORS_IN_SAFEPOINT : bool = false ;
1314 const SINGLE_THREAD_MUTATOR_SCANNING : bool = false ;
1415
15- fn scan_object < EV : EdgeVisitor > (
16+ fn scan_object < EV : EdgeVisitor < V8Edge > > (
1617 _tls : VMWorkerThread ,
1718 _object : ObjectReference ,
1819 _edge_visitor : & mut EV ,
@@ -24,19 +25,19 @@ impl Scanning<V8> for VMScanning {
2425 unimplemented ! ( )
2526 }
2627
27- fn scan_thread_roots ( _tls : VMWorkerThread , _factory : impl RootsWorkFactory ) {
28+ fn scan_thread_roots ( _tls : VMWorkerThread , _factory : impl RootsWorkFactory < V8Edge > ) {
2829 unimplemented ! ( )
2930 }
3031
3132 fn scan_thread_root (
3233 _tls : VMWorkerThread ,
3334 _mutator : & ' static mut Mutator < V8 > ,
34- _factory : impl RootsWorkFactory ,
35+ _factory : impl RootsWorkFactory < V8Edge > ,
3536 ) {
3637 unimplemented ! ( )
3738 }
3839
39- fn scan_vm_specific_roots ( _tls : VMWorkerThread , _factory : impl RootsWorkFactory ) {
40+ fn scan_vm_specific_roots ( _tls : VMWorkerThread , _factory : impl RootsWorkFactory < V8Edge > ) {
4041 unimplemented ! ( )
4142 }
4243
You can’t perform that action at this time.
0 commit comments