]> git.eshelyaron.com Git - emacs.git/commitdiff
add native-units-loaded
authorAndrea Corallo <akrl@sdf.org>
Sun, 17 Nov 2019 11:01:59 +0000 (12:01 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:06 +0000 (11:38 +0100)
src/comp.c

index 066440bcf876c8bea1c1d48be575657e87f706ec..2638290859fb989e381ca3ed8e7b31ce91ccad53 100644 (file)
@@ -3305,6 +3305,12 @@ DEFUN ("native-elisp-load", Fnative_elisp_load, Snative_elisp_load, 1, 1, 0,
   (Lisp_Object file)
 {
   CHECK_STRING (file);
+
+  if (NILP (Fhash_table_p (Vnative_units_loaded)))
+    Vnative_units_loaded = CALLN (Fmake_hash_table, QCtest, Qequal);
+
+  Fputhash (file, Qt, Vnative_units_loaded);
+
   dynlib_handle_ptr handle = dynlib_open (SSDATA (file));
   load_handle_stack = Fcons (make_mint_ptr (handle), load_handle_stack);
   if (!handle)
@@ -3387,10 +3393,14 @@ syms_of_comp (void)
   comp.emitter_dispatcher = Qnil;
 
   DEFVAR_LISP ("comp-ctxt", Vcomp_ctxt,
-              doc: /*
-                    The compiler context.  */);
+              doc: /* The compiler context.  */);
   Vcomp_ctxt = Qnil;
 
+  DEFVAR_LISP ("native-units-loaded", Vnative_units_loaded,
+              doc: /* Hash table containing all the currently loaded
+                      compilation units file names.  */);
+  Vnative_units_loaded = Qnil;
+
   /* Load mechanism.  */
   staticpro (&Vnative_elisp_refs_hash);
   Vnative_elisp_refs_hash