"Compile INPUT into native code.
This is the entrypoint for the Emacs Lisp native compiler.
If INPUT is a symbol, native-compile its function definition.
-If INPUT is a string, use it as the file path to be native compiled."
+If INPUT is a string, use it as the file path to be native compiled.
+Return the compilation unit filename."
(unless (or (symbolp input)
(stringp input))
(error "Trying to native compile something not a symbol function or file"))
(mapc (lambda (pass)
(comp-log (format "Running pass %s:\n" pass))
(setq data (funcall pass data)))
- comp-passes)))
+ comp-passes)
+ data))
(provide 'comp)
gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c");
AUTO_STRING (dot_so, NATIVE_ELISP_SUFFIX);
- const char *filename =
- (const char *) SDATA (CALLN (Fconcat, ctxtname, dot_so));
+ Lisp_Object out_file = CALLN (Fconcat, ctxtname, dot_so);
gcc_jit_context_compile_to_file (comp.ctxt,
GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
- filename);
+ SSDATA (out_file));
pthread_sigmask (SIG_SETMASK, &oldset, 0);
- return Qt;
+ return out_file;
}
\f