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