@@ -907,6 +907,7 @@ static void jl_insert_into_serialization_queue(jl_serializer_state *s, jl_value_
907907 int is_relocatable = !s -> incremental || jl_is_code_info (inferred ) ||
908908 (jl_is_string (inferred ) && jl_string_len (inferred ) > 0 && jl_string_data (inferred )[jl_string_len (inferred ) - 1 ]);
909909 if (!is_relocatable ) {
910+ jl_ (mi );
910911 inferred = jl_nothing ;
911912 }
912913 else if (def -> source == NULL ) {
@@ -3419,9 +3420,6 @@ static void jl_save_system_image_to_stream(ios_t *f, jl_array_t *mod_array,
34193420
34203421static void jl_write_header_for_incremental (ios_t * f , jl_array_t * worklist , jl_array_t * mod_array , jl_array_t * * udeps , int64_t * srctextpos , int64_t * checksumpos )
34213422{
3422- assert (jl_precompile_toplevel_module == NULL );
3423- jl_precompile_toplevel_module = (jl_module_t * )jl_array_ptr_ref (worklist , jl_array_len (worklist )- 1 );
3424-
34253423 * checksumpos = write_header (f , 0 );
34263424 write_uint8 (f , jl_cache_flags ());
34273425 // write description of contents (name, uuid, buildid)
@@ -3479,9 +3477,7 @@ JL_DLLEXPORT void jl_create_system_image(void **_native_data, jl_array_t *workli
34793477 // Generate _native_data`
34803478 if (_native_data != NULL ) {
34813479 jl_prepare_serialization_data (mod_array , newly_inferred , & extext_methods , & new_ext_cis , NULL , & query_cache );
3482- jl_precompile_toplevel_module = (jl_module_t * )jl_array_ptr_ref (worklist , jl_array_len (worklist )- 1 );
34833480 * _native_data = jl_precompile_worklist (worklist , extext_methods , new_ext_cis );
3484- jl_precompile_toplevel_module = NULL ;
34853481 extext_methods = NULL ;
34863482 new_ext_cis = NULL ;
34873483 }
@@ -3528,7 +3524,6 @@ JL_DLLEXPORT void jl_create_system_image(void **_native_data, jl_array_t *workli
35283524 // Re-enable running julia code for postoutput hooks, atexit, etc.
35293525 jl_gc_enable_finalizers (ct , 1 );
35303526 ct -> reentrant_timing &= ~0b1000u ;
3531- jl_precompile_toplevel_module = NULL ;
35323527
35333528 if (worklist ) {
35343529 // Go back and update the checksum in the header
0 commit comments