@@ -225,6 +225,7 @@ static jl_value_t *jl_eval_module_expr(jl_module_t *parent_module, jl_expr_t *ex
225225
226226 for (int i = 0 ; i < jl_array_nrows (exprs ); i ++ ) {
227227 // process toplevel form
228+ ct -> world_age = jl_atomic_load_relaxed (& jl_world_counter );
228229 form = jl_expand_stmt_with_loc (jl_array_ptr_ref (exprs , i ), newm , filename , lineno );
229230 (void )jl_toplevel_eval_flex (newm , form , 1 , 1 , & filename , & lineno );
230231 }
@@ -1010,6 +1011,7 @@ JL_DLLEXPORT jl_value_t *jl_toplevel_eval_flex(jl_module_t *JL_NONNULL m, jl_val
10101011 jl_value_t * res = jl_nothing ;
10111012 int i ;
10121013 for (i = 0 ; i < jl_array_nrows (ex -> args ); i ++ ) {
1014+ ct -> world_age = jl_atomic_load_acquire (& jl_world_counter );
10131015 res = jl_toplevel_eval_flex (m , jl_array_ptr_ref (ex -> args , i ), fast , 0 , toplevel_filename , toplevel_lineno );
10141016 }
10151017 JL_GC_POP ();
@@ -1199,6 +1201,7 @@ static jl_value_t *jl_parse_eval_all(jl_module_t *module, jl_value_t *text,
11991201 jl_lineno = lineno ;
12001202 continue ;
12011203 }
1204+ ct -> world_age = jl_atomic_load_relaxed (& jl_world_counter );
12021205 expression = jl_expand_with_loc_warn (expression , module ,
12031206 jl_string_data (filename ), lineno );
12041207 result = jl_toplevel_eval_flex (module , expression , 1 , 1 , & filename_str , & lineno );
0 commit comments