mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
When closing emacs will inspect all directories from which it loaded native compilation units. If it finds a ".eln.old" file it will try to delete it, if it fails that means that another Emacs instance is using it. When compiling a file we rename the file that was in the output path in case it has been loaded into another Emacs instance. When deleting a package we move any ".eln" or ".eln.old" files in the package folder that we can't delete to `package-user-dir`. Emacs will check that directory when closing and delete them. * lisp/emacs-lisp/comp.el (comp--replace-output-file): Function called from C code to finish the compilation process. It performs renaming of the old file if necessary. * lisp/emacs-lisp/package.el (package--delete-directory): Function to delete a package directory. It moves native compilation units that it can't delete to `package-user-dir'. * src/alloc.c (cleanup_vector): Call dispose_comp_unit(). (garbage_collect): Call finish_delayed_disposal_of_comp_units(). * src/comp.c: Restore the signal mask using unwind-protect. Store loaded native compilation units in a hash table for disposal on close. Store filenames of native compilation units GC'd in a linked list to finish their disposal when the GC is over. (clean_comp_unit_directory): Delete all *.eln.old files in a directory. (clean_package_user_dir_of_old_comp_units): Delete all *.eln.old files in `package-user-dir'. (dispose_all_remaining_comp_units): Dispose of native compilation units that are still loaded. (dispose_comp_unit): Close handle and cleanup directory or arrange for later cleanup if DELAY is true. (finish_delayed_disposal_of_comp_units): Dispose of native compilation units that were GC'd. (register_native_comp_unit): Register native compilation unit for disposal when Emacs closes. * src/comp.h: Introduce cfile member in Lisp_Native_Comp_Unit. Add declarations of functions that: clean directories of unused native compilation units, handle disposal of native compilation units. * src/emacs.c (kill-emacs): Dispose all remaining compilation units right right before calling exit(). * src/eval.c (internal_condition_case_3, internal_condition_case_4): Add functions. * src/lisp.h (internal_condition_case_3, internal_condition_case_4): Add functions. * src/pdumper.c (dump_do_dump_relocation): Set cfile to a copy of the Lisp string specifying the file path. |
||
|---|---|---|
| .. | ||
| advice.el | ||
| autoload.el | ||
| avl-tree.el | ||
| backquote.el | ||
| backtrace.el | ||
| benchmark.el | ||
| bindat.el | ||
| byte-opt.el | ||
| byte-run.el | ||
| bytecomp.el | ||
| cconv.el | ||
| chart.el | ||
| check-declare.el | ||
| checkdoc.el | ||
| cl-extra.el | ||
| cl-generic.el | ||
| cl-indent.el | ||
| cl-lib.el | ||
| cl-macs.el | ||
| cl-preloaded.el | ||
| cl-print.el | ||
| cl-seq.el | ||
| comp.el | ||
| copyright.el | ||
| crm.el | ||
| cursor-sensor.el | ||
| debug.el | ||
| derived.el | ||
| disass.el | ||
| easy-mmode.el | ||
| easymenu.el | ||
| edebug.el | ||
| eieio-base.el | ||
| eieio-compat.el | ||
| eieio-core.el | ||
| eieio-custom.el | ||
| eieio-datadebug.el | ||
| eieio-opt.el | ||
| eieio-speedbar.el | ||
| eieio.el | ||
| eldoc.el | ||
| elint.el | ||
| elp.el | ||
| ert-x.el | ||
| ert.el | ||
| ewoc.el | ||
| faceup.el | ||
| find-func.el | ||
| float-sup.el | ||
| generator.el | ||
| generic.el | ||
| gv.el | ||
| helper.el | ||
| inline.el | ||
| let-alist.el | ||
| lisp-mnt.el | ||
| lisp-mode.el | ||
| lisp.el | ||
| macroexp.el | ||
| map-ynp.el | ||
| map.el | ||
| nadvice.el | ||
| package-x.el | ||
| package.el | ||
| pcase.el | ||
| pp.el | ||
| radix-tree.el | ||
| re-builder.el | ||
| regexp-opt.el | ||
| regi.el | ||
| ring.el | ||
| rmc.el | ||
| rx.el | ||
| seq.el | ||
| shadow.el | ||
| smie.el | ||
| subr-x.el | ||
| syntax.el | ||
| tabulated-list.el | ||
| tcover-ses.el | ||
| tcover-unsafep.el | ||
| testcover.el | ||
| text-property-search.el | ||
| thunk.el | ||
| timer-list.el | ||
| timer.el | ||
| tq.el | ||
| trace.el | ||
| unsafep.el | ||
| warnings.el | ||