[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 1dd2c8c 1/2: * Enable deferred compilation for dynam
From: |
Andrea Corallo |
Subject: |
feature/native-comp 1dd2c8c 1/2: * Enable deferred compilation for dynamic scoped code |
Date: |
Sun, 28 Jun 2020 16:24:44 -0400 (EDT) |
branch: feature/native-comp
commit 1dd2c8cd0770040b616803f4b6a4a81ff314ea6a
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Enable deferred compilation for dynamic scoped code
* src/comp.c (maybe_defer_native_compilation): Trigger for dynamic
code and add a comment.
---
src/comp.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/comp.c b/src/comp.c
index 3abcabc..28f10be 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -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;