@@ -2976,11 +2976,10 @@ JL_EXTENSION NOINLINE void gc_mark_loop_serial(jl_ptls_t ptls)
29762976
29772977void gc_mark_and_steal (jl_ptls_t ptls )
29782978{
2979- jl_gc_markqueue_t * mq = & ptls -> mark_queue ;
2980- jl_gc_markqueue_t * mq_master = NULL ;
29812979 int master_tid = jl_atomic_load (& gc_master_tid );
29822980 assert (master_tid != -1 );
2983- mq_master = & gc_all_tls_states [master_tid ]-> mark_queue ;
2981+ jl_gc_markqueue_t * mq = & ptls -> mark_queue ;
2982+ jl_gc_markqueue_t * mq_master = & gc_all_tls_states [master_tid ]-> mark_queue ;
29842983 void * new_obj ;
29852984 jl_gc_chunk_t c ;
29862985 pop : {
@@ -3024,12 +3023,10 @@ void gc_mark_and_steal(jl_ptls_t ptls)
30243023 }
30253024 }
30263025 // Try to steal chunk from master thread
3027- if (mq_master != NULL ) {
3028- c = gc_chunkqueue_steal_from (mq_master );
3029- if (c .cid != GC_empty_chunk ) {
3030- gc_mark_chunk (ptls , mq , & c );
3031- goto pop ;
3032- }
3026+ c = gc_chunkqueue_steal_from (mq_master );
3027+ if (c .cid != GC_empty_chunk ) {
3028+ gc_mark_chunk (ptls , mq , & c );
3029+ goto pop ;
30333030 }
30343031 // Try to steal pointer from random GC thread
30353032 for (int i = 0 ; i < 4 * jl_n_markthreads ; i ++ ) {
@@ -3047,11 +3044,9 @@ void gc_mark_and_steal(jl_ptls_t ptls)
30473044 goto mark ;
30483045 }
30493046 // Try to steal pointer from master thread
3050- if (mq_master != NULL ) {
3051- new_obj = gc_ptr_queue_steal_from (mq_master );
3052- if (new_obj != NULL )
3053- goto mark ;
3054- }
3047+ new_obj = gc_ptr_queue_steal_from (mq_master );
3048+ if (new_obj != NULL )
3049+ goto mark ;
30553050 }
30563051}
30573052
0 commit comments