]> git.eshelyaron.com Git - emacs.git/commitdiff
* Enable deferred compilation for dynamic scoped code
authorAndrea Corallo <akrl@sdf.org>
Sun, 28 Jun 2020 19:38:13 +0000 (20:38 +0100)
committerAndrea Corallo <akrl@sdf.org>
Sun, 28 Jun 2020 20:23:45 +0000 (21:23 +0100)
* src/comp.c (maybe_defer_native_compilation): Trigger for dynamic
code and add a comment.

src/comp.c

index 3abcabc8933244d677aadbe8524940665721b2b8..28f10bed6d105da941ead8439eb040ba332fd177 100644 (file)
@@ -4411,6 +4411,14 @@ dispose_comp_unit (struct Lisp_Native_Comp_Unit *comp_handle, bool delay)
    loaded the compiler and its dependencies.  */
 static Lisp_Object delayed_sources;
 
+
+/* Queue an asyncronous compilation for the source file defining
+   FUNCTION_NAME and perform a late load.
+
+   NOTE: ideally would be nice to move its call simply into Fload but
+   we need DEFINITION to guard against function redefinition while
+   async compilation happen.  */
+
 void
 maybe_defer_native_compilation (Lisp_Object function_name,
                                Lisp_Object definition)
@@ -4443,7 +4451,6 @@ maybe_defer_native_compilation (Lisp_Object function_name,
       || noninteractive
       || !NILP (Vpurify_flag)
       || !COMPILEDP (definition)
-      || !FIXNUMP (AREF (definition, COMPILED_ARGLIST))
       || !STRINGP (Vload_true_file_name)
       || !suffix_p (Vload_true_file_name, ".elc"))
     return;