diff options
| author | Vibhav Pant | 2020-08-14 14:22:29 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-14 14:22:29 +0530 |
| commit | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (patch) | |
| tree | 935da5f9ff7212b89bdc6c6f460dc76232d5f12e | |
| parent | 229c0c5f8b93694c4993aa96e24a2694bcbc4e6c (diff) | |
| parent | 3882e8fd244a66edb6ba60f40182a4d0772cfcb1 (diff) | |
| download | emacs-9e64a087c4d167e7ec1c4e22bea3e6af53b563de.tar.gz emacs-9e64a087c4d167e7ec1c4e22bea3e6af53b563de.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixes
| -rw-r--r-- | lisp/emacs-lisp/comp.el | 11 | ||||
| -rw-r--r-- | src/pdumper.c | 5 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 599d35b61c5..a92392f63ac 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el | |||
| @@ -2608,13 +2608,16 @@ display a message." | |||
| 2608 | (message "Compiling %s..." ,source-file) | 2608 | (message "Compiling %s..." ,source-file) |
| 2609 | (native-compile ,source-file ,(and load t)))) | 2609 | (native-compile ,source-file ,(and load t)))) |
| 2610 | (source-file1 source-file) ;; Make the closure works :/ | 2610 | (source-file1 source-file) ;; Make the closure works :/ |
| 2611 | (_ (progn | ||
| 2612 | (comp-log "\n") | ||
| 2613 | (comp-log (prin1-to-string expr)))) | ||
| 2614 | (temp-file (make-temp-file | 2611 | (temp-file (make-temp-file |
| 2615 | (concat "emacs-async-comp-" | 2612 | (concat "emacs-async-comp-" |
| 2616 | (file-name-base source-file) "-") | 2613 | (file-name-base source-file) "-") |
| 2617 | nil ".el" (prin1-to-string expr))) | 2614 | nil ".el")) |
| 2615 | (expr-string (prin1-to-string expr)) | ||
| 2616 | (_ (progn | ||
| 2617 | (with-temp-file temp-file | ||
| 2618 | (insert expr-string)) | ||
| 2619 | (comp-log "\n") | ||
| 2620 | (comp-log expr-string))) | ||
| 2618 | (load1 load) | 2621 | (load1 load) |
| 2619 | (process (make-process | 2622 | (process (make-process |
| 2620 | :name (concat "Compiling: " source-file) | 2623 | :name (concat "Compiling: " source-file) |
diff --git a/src/pdumper.c b/src/pdumper.c index 83410e36774..629d0969346 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -5281,12 +5281,13 @@ dump_do_dump_relocation (const uintptr_t dump_base, | |||
| 5281 | struct Lisp_Native_Comp_Unit *comp_u = | 5281 | struct Lisp_Native_Comp_Unit *comp_u = |
| 5282 | XNATIVE_COMP_UNIT (subr->native_comp_u[0]); | 5282 | XNATIVE_COMP_UNIT (subr->native_comp_u[0]); |
| 5283 | if (!comp_u->handle) | 5283 | if (!comp_u->handle) |
| 5284 | error ("can't relocate native subr with not loaded compilation unit"); | 5284 | error ("NULL handle in compilation unit %s", SSDATA (comp_u->file)); |
| 5285 | const char *c_name = subr->native_c_name[0]; | 5285 | const char *c_name = subr->native_c_name[0]; |
| 5286 | eassert (c_name); | 5286 | eassert (c_name); |
| 5287 | void *func = dynlib_sym (comp_u->handle, c_name); | 5287 | void *func = dynlib_sym (comp_u->handle, c_name); |
| 5288 | if (!func) | 5288 | if (!func) |
| 5289 | error ("can't find function in compilation unit"); | 5289 | error ("can't find function \"%s\" in compilation unit %s", c_name, |
| 5290 | SSDATA (comp_u->file)); | ||
| 5290 | subr->function.a0 = func; | 5291 | subr->function.a0 = func; |
| 5291 | Lisp_Object lambda_data_idx = | 5292 | Lisp_Object lambda_data_idx = |
| 5292 | Fgethash (build_string (c_name), comp_u->lambda_c_name_idx_h, Qnil); | 5293 | Fgethash (build_string (c_name), comp_u->lambda_c_name_idx_h, Qnil); |