[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aea05a5dec 1/2: * Expose `comp-loaded-comp-units-h'
From: |
Andrea Corallo |
Subject: |
master aea05a5dec 1/2: * Expose `comp-loaded-comp-units-h' |
Date: |
Thu, 18 Aug 2022 05:03:59 -0400 (EDT) |
branch: master
commit aea05a5dec90c36fa12e0622234a12fbf0a403f3
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Expose `comp-loaded-comp-units-h'
* src/comp.c : remove 'all_loaded_comp_units_h'.
(syms_of_comp): Define `comp-loaded-comp-units-h'.
(register_native_comp_unit, Fnative_elisp_load): Use it.
---
src/comp.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 21d2ee5300..70e7d5a8bb 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5017,8 +5017,6 @@ helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a)
/* `native-comp-eln-load-path' clean-up support code. */
-static Lisp_Object all_loaded_comp_units_h;
-
#ifdef WINDOWSNT
static Lisp_Object
return_nil (Lisp_Object arg)
@@ -5060,11 +5058,12 @@ eln_load_path_final_clean_up (void)
}
/* This function puts the compilation unit in the
- `all_loaded_comp_units_h` hashmap. */
+ `Vcomp_loaded_comp_units_h` hashmap. */
static void
register_native_comp_unit (Lisp_Object comp_u)
{
- Fputhash (XNATIVE_COMP_UNIT (comp_u)->file, comp_u, all_loaded_comp_units_h);
+ Fputhash (
+ XNATIVE_COMP_UNIT (comp_u)->file, comp_u, Vcomp_loaded_comp_units_h);
}
@@ -5552,7 +5551,7 @@ LATE_LOAD has to be non-nil when loading for deferred
compilation. */)
struct Lisp_Native_Comp_Unit *comp_u = allocate_native_comp_unit ();
Lisp_Object encoded_filename = ENCODE_FILE (filename);
- if (!NILP (Fgethash (filename, all_loaded_comp_units_h, Qnil))
+ if (!NILP (Fgethash (filename, Vcomp_loaded_comp_units_h, Qnil))
&& !file_in_eln_sys_dir (filename)
&& !NILP (Ffile_writable_p (filename)))
{
@@ -5754,10 +5753,6 @@ compiled one. */);
staticpro (&loadsearch_re_list);
loadsearch_re_list = Qnil;
- staticpro (&all_loaded_comp_units_h);
- all_loaded_comp_units_h =
- CALLN (Fmake_hash_table, QCweakness, Qkey_and_value, QCtest, Qequal);
-
DEFVAR_LISP ("comp-ctxt", Vcomp_ctxt,
doc: /* The compiler context. */);
Vcomp_ctxt = Qnil;
@@ -5817,6 +5812,12 @@ For internal use. */);
doc: /* When non-nil assume the file being compiled to
be preloaded. */);
+ DEFVAR_LISP ("comp-loaded-comp-units-h", Vcomp_loaded_comp_units_h,
+ doc: /* Hash table recording all loaded compilation units.
+file -> CU. */);
+ Vcomp_loaded_comp_units_h =
+ CALLN (Fmake_hash_table, QCweakness, Qvalue, QCtest, Qequal);
+
Fprovide (intern_c_string ("native-compile"), Qnil);
#endif /* #ifdef HAVE_NATIVE_COMP */