@@ -1846,6 +1846,9 @@ static void jl_write_values(jl_serializer_state *s) JL_GC_DISABLED
1846
1846
assert (f == s -> s );
1847
1847
jl_method_instance_t * newmi = (jl_method_instance_t * )& f -> buf [reloc_offset ];
1848
1848
jl_atomic_store_relaxed (& newmi -> flags , 0 );
1849
+ if (s -> incremental ) {
1850
+ jl_atomic_store_relaxed (& newmi -> dispatch_status , 0 );
1851
+ }
1849
1852
}
1850
1853
else if (jl_is_code_instance (v )) {
1851
1854
assert (f == s -> s );
@@ -4544,49 +4547,6 @@ JL_DLLEXPORT jl_value_t *jl_restore_package_image_from_file(const char *fname, j
4544
4547
return mod ;
4545
4548
}
4546
4549
4547
- JL_DLLEXPORT void _jl_promote_ci_to_current (jl_code_instance_t * ci , size_t validated_world ) JL_NOTSAFEPOINT
4548
- {
4549
- if (jl_atomic_load_relaxed (& ci -> max_world ) != validated_world )
4550
- return ;
4551
- jl_atomic_store_relaxed (& ci -> max_world , ~(size_t )0 );
4552
- jl_svec_t * edges = jl_atomic_load_relaxed (& ci -> edges );
4553
- for (size_t i = 0 ; i < jl_svec_len (edges ); i ++ ) {
4554
- jl_value_t * edge = jl_svecref (edges , i );
4555
- if (!jl_is_code_instance (edge ))
4556
- continue ;
4557
- _jl_promote_ci_to_current ((jl_code_instance_t * )edge , validated_world );
4558
- }
4559
- }
4560
-
4561
- JL_DLLEXPORT void jl_promote_ci_to_current (jl_code_instance_t * ci , size_t validated_world )
4562
- {
4563
- size_t current_world = jl_atomic_load_relaxed (& jl_world_counter );
4564
- // No need to acquire the lock if we've been invalidated anyway
4565
- if (current_world > validated_world )
4566
- return ;
4567
- JL_LOCK (& world_counter_lock );
4568
- current_world = jl_atomic_load_relaxed (& jl_world_counter );
4569
- if (current_world == validated_world ) {
4570
- _jl_promote_ci_to_current (ci , validated_world );
4571
- }
4572
- JL_UNLOCK (& world_counter_lock );
4573
- }
4574
-
4575
- JL_DLLEXPORT void jl_promote_cis_to_current (jl_code_instance_t * * cis , size_t n , size_t validated_world )
4576
- {
4577
- size_t current_world = jl_atomic_load_relaxed (& jl_world_counter );
4578
- // No need to acquire the lock if we've been invalidated anyway
4579
- if (current_world > validated_world )
4580
- return ;
4581
- JL_LOCK (& world_counter_lock );
4582
- current_world = jl_atomic_load_relaxed (& jl_world_counter );
4583
- if (current_world == validated_world ) {
4584
- for (size_t i = 0 ; i < n ; i ++ ) {
4585
- _jl_promote_ci_to_current (cis [i ], validated_world );
4586
- }
4587
- }
4588
- JL_UNLOCK (& world_counter_lock );
4589
- }
4590
4550
4591
4551
#ifdef __cplusplus
4592
4552
}
0 commit comments