emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 07e3145 4/6: * comp.c (maybe_defer_native_compilatio


From: Andrea Corallo
Subject: feature/native-comp 07e3145 4/6: * comp.c (maybe_defer_native_compilation): Add some debug code
Date: Sun, 22 Mar 2020 12:42:41 -0400 (EDT)

branch: feature/native-comp
commit 07e314569b743cfc38b8bb3599355161c576ff32
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    * comp.c (maybe_defer_native_compilation): Add some debug code
---
 src/comp.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/comp.c b/src/comp.c
index 55e6e96..f5961c7 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -3368,6 +3368,27 @@ void
 maybe_defer_native_compilation (Lisp_Object function_name,
                                Lisp_Object definition)
 {
+#if 0
+#include <sys/types.h>
+#include <unistd.h>
+  if (!NILP (function_name) &&
+      STRINGP (Vload_file_name))
+    {
+      static FILE *f;
+      if (!f)
+       {
+         char str[128];
+         sprintf (str, "log_%d", getpid());
+         f = fopen (str, "w");
+       }
+      if (!f)
+       exit (1);
+      fprintf (f, "function %s file %s\n",
+              SSDATA (Fsymbol_name (function_name)),
+              SSDATA (Vload_file_name));
+      fflush (f);
+    }
+#endif
   if (!comp_deferred_compilation
       || noninteractive
       || !NILP (Vpurify_flag)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]