@@ -76,23 +76,34 @@ impl WeakProcessor {
76
76
Box :: new( UpdateWbUnprotectedObjectsList ) as _,
77
77
] ) ;
78
78
79
+ let forward = crate :: mmtk ( ) . get_plan ( ) . current_gc_may_move_object ( ) ;
80
+
79
81
// Experimenting with frozen strings table
80
82
Self :: process_weak_table_chunked (
81
83
"frozen strings" ,
82
84
( upcalls ( ) . get_frozen_strings_table ) ( ) ,
85
+ true ,
86
+ false ,
87
+ forward,
83
88
worker,
84
89
) ;
85
90
86
91
Self :: process_weak_table_chunked (
87
92
"global symbols" ,
88
93
( upcalls ( ) . get_global_symbols_table ) ( ) ,
94
+ false ,
95
+ true ,
96
+ forward,
89
97
worker,
90
98
) ;
91
99
}
92
100
93
101
pub fn process_weak_table_chunked (
94
102
name : & str ,
95
103
table : * mut st_table ,
104
+ weak_keys : bool ,
105
+ weak_values : bool ,
106
+ forward : bool ,
96
107
worker : & mut GCWorker < Ruby > ,
97
108
) {
98
109
let mut entries_start = 0 ;
@@ -118,6 +129,9 @@ impl WeakProcessor {
118
129
table,
119
130
begin,
120
131
end,
132
+ weak_keys,
133
+ weak_values,
134
+ forward,
121
135
after_all,
122
136
} ) as _
123
137
} )
@@ -281,6 +295,9 @@ struct UpdateTableEntriesParallel {
281
295
table : * mut st_table ,
282
296
begin : usize ,
283
297
end : usize ,
298
+ weak_keys : bool ,
299
+ weak_values : bool ,
300
+ forward : bool ,
284
301
after_all : Arc < AfterAll > ,
285
302
}
286
303
@@ -291,7 +308,14 @@ impl UpdateTableEntriesParallel {}
291
308
impl GCWork < Ruby > for UpdateTableEntriesParallel {
292
309
fn do_work ( & mut self , worker : & mut GCWorker < Ruby > , _mmtk : & ' static mmtk:: MMTK < Ruby > ) {
293
310
debug ! ( "Updating entries of {} table" , self . name) ;
294
- ( upcalls ( ) . st_update_entries_range ) ( self . table , self . begin , self . end ) ;
311
+ ( upcalls ( ) . st_update_entries_range ) (
312
+ self . table ,
313
+ self . begin ,
314
+ self . end ,
315
+ self . weak_keys ,
316
+ self . weak_values ,
317
+ self . forward ,
318
+ ) ;
295
319
debug ! ( "Done updating entries of {} table" , self . name) ;
296
320
self . after_all . count_down ( worker) ;
297
321
}
0 commit comments