File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -548,20 +548,21 @@ JL_DLLEXPORT void jl_finalize_th(jl_ptls_t ptls, jl_value_t *o)
548
548
arraylist_free (& copied_list );
549
549
}
550
550
551
+ // explicitly scheduled objects for the sweepfunc callback
551
552
static void gc_sweep_foreign_objs_in_list (arraylist_t * objs )
552
553
{
553
554
size_t p = 0 ;
554
555
for (size_t i = 0 ; i < objs -> len ; i ++ ) {
555
- jl_value_t * v = (jl_value_t * )(objs -> items [i ]);
556
- jl_datatype_t * t = (jl_datatype_t * )(jl_typeof (v ));
556
+ jl_value_t * v = (jl_value_t * )(objs -> items [i ]);
557
+ jl_datatype_t * t = (jl_datatype_t * )(jl_typeof (v ));
557
558
const jl_datatype_layout_t * layout = t -> layout ;
558
559
jl_fielddescdyn_t * desc = (jl_fielddescdyn_t * )jl_dt_layout_fields (layout );
559
- if (!gc_ptr_tag (v , 1 )) {
560
+
561
+ int bits = jl_astaggedvalue (v )-> bits .gc ;
562
+ if (!gc_marked (bits ))
560
563
desc -> sweepfunc (v );
561
- }
562
- else {
564
+ else
563
565
objs -> items [p ++ ] = v ;
564
- }
565
566
}
566
567
objs -> len = p ;
567
568
}
Original file line number Diff line number Diff line change @@ -561,8 +561,10 @@ void sweep_stack_data(jl_value_t *p)
561
561
{
562
562
obj_sweeps ++ ;
563
563
dynstack_t * stk = (dynstack_t * )p ;
564
- if (stk -> size > stk -> capacity )
565
- jl_error ("internal error during sweeping" );
564
+ if (stk -> size > stk -> capacity ) {
565
+ assert (0 && "internal error during sweeping" );
566
+ abort ();
567
+ }
566
568
}
567
569
568
570
// Safely execute Julia code
You can’t perform that action at this time.
0 commit comments