- if (jl_all_tls_states == NULL)
- return;
-
- jl_task_t *ct = jl_current_task;
-
- if (exitcode == 0)
- jl_write_compiler_output();
- jl_print_gc_stats(JL_STDERR);
- if (jl_options.code_coverage)
- jl_write_coverage_data(jl_options.output_code_coverage);
- if (jl_options.malloc_log)
- jl_write_malloc_log();
- if (jl_base_module) {
- jl_value_t *f = jl_get_global(jl_base_module, jl_symbol("_atexit"));
- if (f != NULL) {
- JL_TRY {
- size_t last_age = ct->world_age;
- ct->world_age = jl_get_world_counter();
- jl_apply(&f, 1);
- ct->world_age = last_age;
- }