aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-06-28 20:38:13 +0100
committerAndrea Corallo2020-06-28 21:23:45 +0100
commit1dd2c8cd0770040b616803f4b6a4a81ff314ea6a (patch)
tree1c6157d17e2197d00c8bcd678d2c2875a6b91849 /src
parent98196b03c170a148bb5d558bb9df8a923a652ed6 (diff)
downloademacs-1dd2c8cd0770040b616803f4b6a4a81ff314ea6a.tar.gz
emacs-1dd2c8cd0770040b616803f4b6a4a81ff314ea6a.zip
* Enable deferred compilation for dynamic scoped code
* src/comp.c (maybe_defer_native_compilation): Trigger for dynamic code and add a comment.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index 3abcabc8933..28f10bed6d1 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)
4411 loaded the compiler and its dependencies. */ 4411 loaded the compiler and its dependencies. */
4412static Lisp_Object delayed_sources; 4412static Lisp_Object delayed_sources;
4413 4413
4414
4415/* Queue an asyncronous compilation for the source file defining
4416 FUNCTION_NAME and perform a late load.
4417
4418 NOTE: ideally would be nice to move its call simply into Fload but
4419 we need DEFINITION to guard against function redefinition while
4420 async compilation happen. */
4421
4414void 4422void
4415maybe_defer_native_compilation (Lisp_Object function_name, 4423maybe_defer_native_compilation (Lisp_Object function_name,
4416 Lisp_Object definition) 4424 Lisp_Object definition)
@@ -4443,7 +4451,6 @@ maybe_defer_native_compilation (Lisp_Object function_name,
4443 || noninteractive 4451 || noninteractive
4444 || !NILP (Vpurify_flag) 4452 || !NILP (Vpurify_flag)
4445 || !COMPILEDP (definition) 4453 || !COMPILEDP (definition)
4446 || !FIXNUMP (AREF (definition, COMPILED_ARGLIST))
4447 || !STRINGP (Vload_true_file_name) 4454 || !STRINGP (Vload_true_file_name)
4448 || !suffix_p (Vload_true_file_name, ".elc")) 4455 || !suffix_p (Vload_true_file_name, ".elc"))
4449 return; 4456 return;