summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in error message in native-compile-prune-cacheLars Ingebrigtsen2022-07-231-1/+1
| | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Fix typo (bug#56713).
* Give a better error message in native-compile-prune-cacheLars Ingebrigtsen2022-07-221-0/+2
| | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Give a better error message in non-nativecomp builds.
* Merge from origin/emacs-28Stefan Kangas2022-07-141-1/+1
|\ | | | | | | | | | | | | | | | | 9db6817d63 Remove uneffective test 7af88de410 Mark async worker tmp file as utf-8-emacs-unix (bug#48029) # Conflicts: # test/src/comp-resources/comp-test-45603.el # test/src/comp-tests.el
| * Mark async worker tmp file as utf-8-emacs-unix (bug#48029)Andrea Corallo2022-07-131-1/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-final): Mark async worker tmp file as utf-8. * test/src/comp-tests.el (48029-1): New test. * test/src/comp-resources/comp-test-funcs.el (comp-test-48029-nonascii-žžž-f): New function.
* | Merge from origin/emacs-28Stefan Kangas2022-07-121-1/+3
|\| | | | | | | | | | | | | | | 9183d1672c ; * etc/PROBLEMS: Give a URL for bug#50666. 1f508a8b6f etc/PROBLEMS: Describe issues with native compilation on C... 84a5d47125 ; Fix last change 0461021893 ; * lisp/emacs-lisp/comp.el (native-comp-speed): Explain t... 876317271b * lisp/find-dired.el (find-dired): Doc fix; add crossrefer...
| * ; * lisp/emacs-lisp/comp.el (native-comp-speed): Explain the -1 value.Eli Zaretskii2022-07-111-1/+3
| |
| * * Fix native comp for non trivial function names (bug#52833)Andrea Corallo2022-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation for functions with function names containing non trivial characters (bug#52833). This commit is the backport of e7699bf290. Do not merge to master
| * Revert "Remove the filename argument from the command line after an ELC+ELN ↵Eli Zaretskii2022-01-101-2/+1
| | | | | | | | | | | | | | | | | | build" This reverts commit ffc047c896413b6e00032518fc934f08768671fa. Please don't install anything non-trivial on the release branch without asking first.
| * Remove the filename argument from the command line after an ELC+ELN buildAlan Mackenzie2022-01-101-1/+2
| | | | | | | | | | This fixes bug #53164. Without this fix, bootstrap-emacs loads the source file uselessly into a buffer after completing the compilation.
* | Make some defcustom types more restrictiveStefan Kangas2022-07-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/abbrev.el (abbrev-suggest-hint-threshold): * lisp/bookmark.el (bookmark-bmenu-file-column) (bookmark-menu-length): * lisp/buff-menu.el (Buffer-menu-size-width) (Buffer-menu-mode-width): * lisp/calendar/calendar.el (calendar-week-start-day) (calendar-intermonth-spacing, calendar-column-width) (calendar-day-digit-width): * lisp/calc/calc.el (calc-undo-length): * lisp/calendar/timeclock.el (timeclock-workday): * lisp/comint.el (comint-buffer-maximum-size) (comint-input-ring-size): * lisp/doc-view.el (doc-view-resolution, doc-view-image-width): * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-max-column): * lisp/emacs-lisp/comp.el (native-comp-debug) (native-comp-verbose, native-comp-async-jobs-number): * lisp/emacs-lisp/package.el (package-name-column-width) (package-version-column-width, package-status-column-width) (package-archive-column-width): * lisp/eshell/esh-mode.el (eshell-buffer-maximum-lines): * lisp/frame.el (blink-cursor-blinks): * lisp/info.el (Info-breadcrumbs-depth): * lisp/jit-lock.el (jit-lock-chunk-size): * lisp/kmacro.el (kmacro-ring-max): * lisp/menu-bar.el (yank-menu-length, yank-menu-max-items): * lisp/midnight.el (clean-buffer-list-delay-general) (clean-buffer-list-delay-special): * lisp/net/dictionary.el (dictionary-port) (dictionary-proxy-port): * lisp/net/ldap.el (ldap-default-port): * lisp/net/pop3.el (pop3-port, pop3-stream-length): * lisp/net/rcirc.el (rcirc-default-port): * lisp/net/sieve-manage.el (sieve-manage-default-port): * lisp/play/spook.el (spook-phrase-default-count): * lisp/play/tetris.el (tetris-buffer-width) (tetris-buffer-height, tetris-width, tetris-height) (tetris-top-left-x, tetris-top-left-y): * lisp/profiler.el (profiler-sampling-interval): * lisp/progmodes/sql.el (sql-port): * lisp/recentf.el (recentf-max-menu-items): * lisp/strokes.el (strokes-grid-resolution): * lisp/tab-bar.el (tab-bar-tab-name-truncated-max): * lisp/term/xterm.el (xterm-max-cut-length): * lisp/time.el (display-time-interval, world-clock-timer-second): * lisp/url/url-cache.el (url-cache-expire-time): * lisp/url/url-cookie.el (url-cookie-save-interval): * lisp/url/url-history.el (url-history-save-interval): * lisp/url/url-queue.el (url-queue-parallel-processes) (url-queue-timeout): * lisp/url/url-vars.el (url-max-password-attempts) (url-max-redirections): * lisp/vc/emerge.el (emerge-min-visible-lines): * lisp/vc/vc.el (vc-log-show-limit): * lisp/window.el (window-min-height, window-min-width): * lisp/winner.el (winner-ring-size): Use :type natnum. * lisp/savehist.el (savehist-file-modes): Fix setting to nil value and use :type natnum.
* | Add native-compile-prune-cache commandLars Ingebrigtsen2022-07-021-0/+24
| | | | | | | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): New command (bug#48108).
* | Allow plist-get/plist-put/plist-member to take a comparison functionLars Ingebrigtsen2022-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/lists.texi (Plist Access): Document it. * lisp/filesets.el (filesets-reset-fileset) (filesets-ingroup-cache-get): (filesets-ingroup-cache-put): (filesets-build-menu-now): Don't use lax-plist functions. * lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from fns.c and make obsolete. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark plist functions as side-effect-free or pure. * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type. * lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated functions. * src/xdisp.c (build_desired_tool_bar_string): (display_mode_element): (store_mode_line_string): (display_string): (produce_stretch_glyph): (note_mode_line_or_margin_highlight): (note_mouse_highlight): * src/w32.c (serial_configure): * src/sysdep.c (serial_configure): * src/sound.c (parse_sound): * src/process.c (Fset_process_buffer): (Fset_process_sentinel): (Fprocess_contact): (Fmake_process): (Fmake_pipe_process): (Fset_network_process_option): (Fserial_process_configure): (Fmake_serial_process): (set_network_socket_coding_system): (finish_after_tls_connection): (connect_network_socket): (Fmake_network_process): (server_accept_connection): * src/lread.c (ADDPARAM): (hash_table_from_plist): * src/keyboard.c (make_lispy_position): * src/indent.c (check_display_width): * src/image.c (postprocess_image): * src/gnutls.c (gnutls_verify_boot): (Fgnutls_boot): (gnutls_symmetric): (Fgnutls_hash_mac): (Fgnutls_hash_digest): * src/dired.c (filter): * src/data.c (add_to_function_history): * src/coding.c (Fcoding_system_put): Adjust callers from Fplist_put (etc) to plist_put. * src/fns.c (plist_get): (plist_put): (plist_member): New functions (without optional third parameter) to be used in C code. * src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an optional predicate parameter (bug#47425). * src/lisp.h: Declare new plist_put, plist_get and plist_member functions. * test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get. * test/src/fns-tests.el (test-cycle-lax-plist-get): (test-cycle-lax-plist-put): (lax-plist-get/odd-number-of-elements): (test-plist): Remove lax-plist tests, since semantics have changed (they no longer error out on cycles).
* | Fix native-comp of trampolines after previous changeLars Ingebrigtsen2022-05-281-0/+1
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--native-compile): Don't delete the explicitly specified output file, just temp files.
* | Make comp--native-compile delete the temp file it createsLars Ingebrigtsen2022-05-261-42/+53
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--native-compile): Delete the temporary files we create (bug#55611).
* | Fix comp-mvar doc string quotingLars Ingebrigtsen2022-05-241-1/+1
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-mvar): Fix quoting of symbol in doc string.
* | comp.el: Cosmetic changesStefan Monnier2022-05-221-23/+39
| | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Tweak code. (comp-run-async-workers): Don't set `buffer-read-only` directly. (native--compile-async): Fix misuse of "path".
* | ; Fix two mail addressesAndrea Corallo2022-05-161-1/+1
| | | | | | | | | | ;* lisp/emacs-lisp/comp.el: Fix author's mail address. ;* lisp/emacs-lisp/comp-cstr.el: Likewise.
* | Fix native-comp type of prin1-to-stringLars Ingebrigtsen2022-05-151-1/+1
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix type of prin1-to-string.
* | Audit quoting the quote character in doc stringsLars Ingebrigtsen2022-04-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/regex-emacs-tests.el (regex-tests-compare): (regex-tests-compare): (regex-tests-match): * test/lisp/xml-tests.el (xml-parse-tests--qnames): * test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from): * test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset): * test/lisp/calc/calc-tests.el (calc-tests-equal): * lisp/window.el (get-lru-window): (get-mru-window): (get-largest-window): (quit-restore-window): (display-buffer): * lisp/vc/vc-rcs.el (vc-rcs-consult-headers): * lisp/url/url-auth.el (url-digest-auth-build-response): * lisp/tutorial.el (tutorial--find-changed-keys): * lisp/transient.el (transient-suffix-object): * lisp/textmodes/rst.el (rst-insert-list-new-item): * lisp/textmodes/bibtex.el (bibtex-clean-entry): * lisp/tab-bar.el (tab-bar--key-to-number): (toggle-frame-tab-bar): * lisp/ses.el (ses-recalculate-cell): (ses-define-local-printer): (ses-prin1): * lisp/progmodes/xref.el (xref--find-ignores-arguments): * lisp/progmodes/verilog-mode.el (verilog-single-declaration-end): * lisp/progmodes/tcl.el (tcl-mode-hook): * lisp/progmodes/gdb-mi.el (gdb-get-buffer-create): * lisp/progmodes/elisp-mode.el (elisp--xref-make-xref): * lisp/play/dunnet.el (dun-room-objects): * lisp/outline.el (outline--cycle-state): * lisp/org/ox-publish.el (org-publish-find-property): * lisp/org/ox-html.el (org-html--unlabel-latex-environment): * lisp/org/org-table.el (org-table-collapse-header): * lisp/org/org-plot.el (org--plot/prime-factors): * lisp/org/org-agenda.el (org-agenda--mark-blocked-entry): (org-agenda-set-restriction-lock): * lisp/org/ob-lua.el (org-babel-lua-read-string): * lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process): (org-babel-julia-evaluate-session): * lisp/org/ob-core.el (org-babel-default-header-args): * lisp/obsolete/mouse-sel.el (mouse-select): (mouse-select-secondary): * lisp/net/tramp.el (tramp-methods): * lisp/net/eww.el (eww-accept-content-types): * lisp/net/dictionary-connection.el (dictionary-connection-status): * lisp/minibuffer.el (completion-flex--make-flex-pattern): * lisp/mh-e/mh-mime.el (mh-have-file-command): * lisp/mh-e/mh-limit.el (mh-subject-to-sequence): (mh-subject-to-sequence-threaded): (mh-subject-to-sequence-unthreaded): * lisp/mail/feedmail.el (feedmail-queue-buffer-file-name): (feedmail-vm-mail-mode): * lisp/ls-lisp.el (ls-lisp--sanitize-switches): * lisp/keymap.el (key-valid-p): * lisp/international/ccl.el (ccl-compile-branch-blocks): * lisp/image/image-converter.el (image-convert): * lisp/gnus/spam.el (spam-backend-check): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/nnmairix.el (nnmairix-widget-other): * lisp/gnus/message.el (message-mailto): * lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article): * lisp/gnus/gnus-search.el (gnus-search-prepare-query): * lisp/frame.el (frame-size-history): * lisp/eshell/esh-var.el (eshell-parse-variable-ref): * lisp/eshell/em-dirs.el (eshell-expand-multiple-dots): * lisp/erc/erc-backend.el (erc-bounds-of-word-at-point): * lisp/emulation/cua-rect.el (cua--rectangle-operation): * lisp/emacs-lisp/text-property-search.el (text-property-search-forward): * lisp/emacs-lisp/package.el (package-desc-suffix): * lisp/emacs-lisp/faceup.el (faceup-test-explain): * lisp/emacs-lisp/comp.el (comp-curr-allocation-class): (comp-alloc-class-to-container): (comp-add-cstrs): (comp-remove-type-hints-func): (batch-byte+native-compile): * lisp/emacs-lisp/cl-macs.el (cl--optimize): * lisp/elec-pair.el (electric-pair--syntax-ppss): * lisp/doc-view.el (doc-view-doc-type): * lisp/cedet/semantic/symref.el (semantic-symref-tool-alist): (semantic-symref-hit-to-tag-via-db): (semantic-symref-hit-to-tag-via-buffer): * lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay): * lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map): * lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function): * lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions): * lisp/cedet/semantic.el (semantic-working-type): * lisp/cedet/ede/files.el (ede-flush-directory-hash): * lisp/calc/calc.el (calc--header-line): * lisp/auth-source.el (auth-source-pick-first-password): (auth-source--decode-octal-string): * etc/themes/modus-themes.el (modus-themes--paren): (modus-themes--agenda-habit): * admin/cus-test.el (cus-test-vars-with-changed-state): Fix quoting in doc strings. In code examples, the ' character is quoted with \\=, and regularize 'foo to `foo', and quote strings like "foo" instead of 'foo'.
* | Make `command-modes' work for (native-compiled) subrs, tooLars Ingebrigtsen2022-03-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-func): Add a command-modes slot. (comp-spill-lap-function, comp-intern-func-in-ctxt): Fill it. (comp-emit-for-top-level, comp-emit-lambda-for-top-level): Use it. * src/alloc.c (mark_object): Mark the command_modes slot. * src/comp.c (make_subr): Add a command_modes parameter. (Fcomp__register_lambda): Use it. (Fcomp__register_subr): Ditto. * src/data.c (Fcommand_modes): Output the command_modes data for subrs (bug#54437). * src/lisp.h (GCALIGNED_STRUCT): Add a command_modes slot. * src/pdumper.c (dump_subr): Update hash. (dump_subr): Dump the command_modes slot.
* | * Have `null' and `not' explicit in LIMPLE so we inline themAndrea Corallo2022-02-041-1/+3
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Generate explicit `eq' call in LIMPLE for LAP opcode 'not'.
* | (byte-compile-eval): Adjust to changes in `load-history`Stefan Monnier2022-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `function-history` patch introduced a regression which caused spurious compiler warnings. Fix it. The new code also fixes a bug in the old code, thus causing some new non-spurious warnings. Fix them as well. * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to changes in `load-history`. * lisp/gnus/gnus-group.el (nnrss-discover-feed) (nnrss-save-server-data): Use `declare-function`. * lisp/cedet/semantic/wisent/comp.el (wisent-defcontext) (wisent-with-context): * lisp/emacs-lisp/comp.el (comp-op-case): Silence compiler warning.
* | * `batch-byte+native-compile' produce .eln younger than .elc (bug#52912)Andrea Corallo2022-01-251-6/+11
| | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (batch-native-compile): Add return value. (batch-byte+native-compile): Touch the produced .eln after the corresponding .elc is produced.
* | * lisp/emacs-lisp/comp.el (batch-byte+native-compile): Fix unwind formAndrea Corallo2022-01-251-2/+2
| |
* | Remove the unused unbind-all bytecodeMattias Engdegård2022-01-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | It was implemented but never generated, originally intended for TCO in the pre-lexbind era (which was semantically dubious anyway). Removing it speeds up the interpreter because there is no longer any need for the outermost `count` variable unless checking is enabled. * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): * src/bytecode.c (BYTE_CODES, exec_byte_code): Remove definition and implementation of unbind-all, freeing up the opcode for other purposes.
* | Merge branch 'master' into scratch/correct-warning-posAlan Mackenzie2022-01-221-4/+6
|\ \
| * | Suspend temp .elc production when native compiling till when necessaryAndrea Corallo2022-01-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-to-native-output-buffer-file): Rename from `byte-to-native-output-file'. (byte-write-target-file): Update. (byte-compile-file): Write the temporary .elc only when not native compiling. (byte-compile-file): Kill the .elc buffer only when not native compiling. * lisp/emacs-lisp/comp.el (batch-byte+native-compile): Instead of just renaming the temporary .elc make use of `byte-write-target-file' to write it down and kill the temporary buffer.
* | | Commit fixes and enhancements to the scratch/correct-warning-pos branchAlan Mackenzie2022-01-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer strip positions from symbols before each use of a form, instead relying on the low level C routines to do the right thing. Instead strip them from miscellaneous places where this is needed. Stip them alson in `function-put'. Push forms onto byte-compile-form-stack and pop them "by hand" rather than by binding the variable at each pushing, so that it will still have its data after an error has been thrown and caught by a condition case. This gives an source position to the ensuing error message. * lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen, byte-run--circular-list-p) (byte-run--strip-s-p-1, byte-run-strip-symbol-positions): New functions and variables, which together implement stripping of symbol positions. The latest (?final) version modifies the argument in place rather than making a copy. (function-put): Strip symbol positions from all of the arguments before doing the `put'. * lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): has been renamed to byte-compile-form-stack and moved to macroexp.el. (byte-compile-initial-macro-environment (eval-and-compile)): Replace macroexpand-all-toplevel with macroexpand--all-toplevel. (displaying-byte-compile-warnings): bind byte-compile-form-stack here. (byte-compile-toplevel-file-form, byte-compile-form): Push the top level form onto byte-compile-form-stack (whereas formally the variable was bound at each pushing). Manually pop this from of the variable at the end of the function. * lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Remove the symbol stripping. * lisp/emacs-lisp/comp.el (comp--native-compile): Set max-specpdl-size to at least 5000 (previously it was 2500). Bind print-symbols-bare to t. * lisp/emacs-lisp/macroexp.el (byte-compile-form-stack): Definition move here from bytecomp.el for easier compilation. (byte-compile-strip-symbol-positions and associated functions): Removed. (macro--expand-all): push argument FORM onto byte-compile-form-stack at the start of this function, and pop it off at the end. (internal-macroexpand-for-load): No longer strip symbol positions. Bind symbols-with-pos-enabled and print-symbols-bare to t. * lisp/help.el (help--make-usage): Strip any position from argument ARG. * src/fns.c (Fput): No longer strip symbol positions from any of the arguments.
* | | Merge branch 'master' into scratch/correct-warning-posAlan Mackenzie2022-01-111-16/+9
|\| |
| * | Remove the filename argument from the command line after an ELC+ELN buildAlan Mackenzie2022-01-111-1/+2
| | | | | | | | | | | | | | | This fixes bug #53164. Without this fix, bootstrap-emacs loads the source file uselessly into a buffer after completing the compilation.
| * | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| | * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| | |
| * | * Fix native comp for non trivial function names (bug#52833)Andrea Corallo2021-12-281-1/+3
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation for functions with function names containing non trivial characters (bug#52833).
| * | Make use of `comp-cstr-shallow-copy'Andrea Corallo2021-12-011-13/+3
| |/ | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-mvar-propagate): Remove. (comp-fwprop-call, comp-fwprop-insn): Use `comp-cstr-shallow-copy'. * lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range) (comp-cstr-union-1-no-mem, comp-cstr-union-1) (comp-cstr-intersection-no-mem, comp-cstr-intersection) (comp-cstr-negation): Use `comp-cstr-shallow-copy'.
* | Miscellaneous enhancements to scratch/correct-warning-pos.Alan Mackenzie2021-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Check the type (symbol with position) of the argument given to the native compiled version of SYMBOL_WITH_POS_SYM. 2. Handle infinite recursion caused by circular lists, etc., in macroexp-strip-symbol-positions by using hash tables. 3. Read byte compiled functions without giving symbols positions. * lisp/emacs-lisp/comp.el (comp-finalize-relocs): Add symbol-with-pos-p into the list of relocated symbols. * lisp/emacs-lisp/macroexp.el (macroexp--ssp-conses-seen) (macroexp--ssp-vectors-seen, macroexp--ssp-records-seen): Renamed, and animated as hash tables. (macroexp--strip-s-p-2): Optionally tests for the presence of an argument in one of the above hash tables, so as to handle otherwise infinite recursion. (byte-compile-strip-s-p-1): Add a condition-case to handle infinite recursion caused by circular lists etc., using the above hash tables as required. * src/comp.c (comp_t): New element symbol_with_pos_sym. (emit_SYMBOL_WITH_POS_SYM): Amend just to call the new SYMBOL_WITH_POS_SYM. (emit_CHECK_SYMBOL_WITH_POS, define_SYMBOL_WITH_POS_SYM): New functions. (Fcomp__init_ctxt): Register an emitter for Qsymbol_with_pos_p. (Fcomp__compile_ctxt_to_file): Call define_SYMBOL_WITH_POS_SYM. (syms_of_comp): Define Qsymbol_with_pos_p. * src/data.c (syms_of_data): Define a new error symbol Qrecursion_error, an error category for the new error symbols Qexcessive_variable_binding and Qexcessive_lisp_nesting. * src/eval.c (grow_specpdl): Change the signal_error call to an xsignal0 call using the new error symbol Qexcessive_variable_binding. (eval_sub, Ffuncall): Change the `error' calls to xsignal using the new error symbol Qexcessive_lisp_nesting. * src/lread.c (read1): When reading a compiled function, read the components of the vector without giving its symbols a position.
* | Make symbols with positions work with native compilationAlan Mackenzie2021-12-301-7/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version of the software should bootstrap Emacs successfully with native compilation enabled. * lisp/emacs-lisp/bytecomp.el (byte-compile-strip-s-p-1) (byte-compile-strip-symbol-positions): Rename and move to macroexp.el. Rename calls to these functions throughout the file. (byte-compile-initial-macro-environment): In the code sections for eval-when-compile and eval-and-compile, call macroexp-strip-symbol-positions before evaluating code. (byte-compile-file, byte-compile-output-file-form) (byte-compile-file-form-defmumble, byte-compile, batch-byte-compile): Call macroexp-strip-symbol-positions from code being passed to the native compiler. * lisp/emacs-lisp/cl-macs.el (cl-macs--strip-s-p-1) (cl-macs--strip-symbol-positions): Remove, replacing them with the renamed functions in macroexp.el. (cl-define-compiler-macro): Apply macroexp-strip-symbol-positions to ARGS and BODY. * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Use `null' to compile byte-not rather than a compilation of `eq'. (comp--native-compile): bind symbols-with-pos-enabled to t. * lisp/emacs-lisp/macroexp.el (byte-compile--ssp-conses-seen) (byte-compile--ssp-vectors-seen, byte-compile--ssp-records-seen): Provisional auxiliary variables to support the following functions. (macroexp--strip-s-p-2, byte-compile-strip-s-p-1) (macroexp-strip-symbol-positions): Functions moved from bytecomp.el, renamed, and further developed. (macroexp--compiler-macro): Bind symbol-with-pos-enabled to t around the call to `handler'. (internal-macroexpand-for-load): Strip symbol positions from the form being eagerly expanded for macros. * src/comp.c (F_SYMBOLS_WITH_POS_ENABLED_RELOC_SYM): New macro for a relocation symbol. (comp_t): New elements bool_ptr_type, f_symbols_with_pos_enabled_ref, lisp_symbol_with_position, lisp_symbol_with_position_header, lisp_symbol_with_position_sym, lisp_symbol_with_position_pos, lisp_symbol_with_position_type, lisp_symbol_with_position_ptr_type, get_symbol_with_position. (helper_GET_SYMBOL_WITH_POSITION): New function. (emit_BASE_EQ): Function rename from emit_EQ. (emit_AND, emit_OR, emit_BARE_SYMBOL_P, emit_SYMBOL_WITH_POS_P) (emit_SYMBOL_WITH_POS_SYM): New functions. (emit_EQ): New function which handles symbols with position correctly. (emit_NILP): Use emit_BASE_EQ rather than emit_EQ. (emit_limple_insn): When emitting a conditional branch, check each operand for being a literal Qnil, and if one of them is, use emit_BASE_EQ rather than emit_EQ. (declare_runtime_imported_funcs): Declare helper_GET_SYMBOL_WITH_POSITION. (emit_ctxt_code): Export the global F_SYMBOLS_WITH_POS_ENABLED_RELOC_SYM. (define_lisp_symbol_with_position, define_GET_SYMBOL_WITH_POSITION): New functions. (Fcomp__init_ctxt): Initialise comp.bool_ptr_type, call the two new define_.... functions. (load_comp_unit): Initialise **f_symbols_with_pos_enabled_reloc. * src/fns.c (Fput): Strip positions from symbols in PROPNAME and VALUE.
* * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix target dir.Andrea Corallo2021-10-161-1/+2
|
* * Fix `native-compile-target-directory' effectiveness on trampolinesAndrea Corallo2021-10-151-1/+3
| | | | | | * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix `native-compile-target-directory' effectiveness on trampoline compilation.
* ; * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix comment.Andrea Corallo2021-10-151-2/+2
|
* New function num-processorsPaul Eggert2021-10-101-14/+1
| | | | | | | | | | | | | | | | | | | This addresses a FIXME comment in lisp/emacs-lisp/comp.el, relating to the number of subsidiary processes used by comp-run-async-workers in native compilation. * admin/merge-gnulib (GNULIB_MODULES): Add nproc. * doc/lispref/processes.texi (Process Information), etc/NEWS: Document num-processors. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/nproc.c, lib/nproc.h, m4/nproc.m4: New files, copied from Gnulib by admin/merge-gnulib. * lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl. (comp-effective-async-max-jobs): Use num-processors. * src/process.c: Include nproc.h. (Fnum_processors): New function. (syms_of_process): Define ‘all’, ‘current’, ‘num-processors’. * src/w32proc.c (Fw32_get_nproc): Add FIXME comment. * test/src/process-tests.el (process-num-processors): New test.
* * Fix `batch-native-compile' not to spawn a subprocessAndrea Corallo2021-10-041-4/+8
| | | | | | * lisp/emacs-lisp/comp.el (comp-running-batch-compilation): New var. (comp-final): Use it. (batch-native-compile): Bind `comp-running-batch-compilation' it.
* ; * lisp/emacs-lisp/comp.el (batch-native-compile): Don't use non-ASCII.Eli Zaretskii2021-09-281-1/+1
|
* Make the build of source tarball produce *.eln filesEli Zaretskii2021-09-281-9/+16
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (batch-native-compile): Accept an optional argument; if non-nil, place the .eln file as appropriate for building a source tarball. * doc/lispref/compile.texi (Native-Compilation Functions): Document the new optional argument of 'batch-native-compile'. * lisp/Makefile.in (.PHONY, $(THEFILE)n) [HAVE_NATIVE_COMP]: New targets. * src/Makefile.in (%.eln) [HAVE_NATIVE_COMP]: New recipe. (all) [HAVE_NATIVE_COMP]: Add ../native-lisp to prerequisites. (elnlisp) [HAVE_NATIVE_COMP]: New list of *.eln files. (../native-lisp) [HAVE_NATIVE_COMP]: New recipe. * src/verbose.mk.in (AM_V_ELN): New macro.
* ; * lisp/emacs-lisp/comp.el (batch-native-compile): Doc fix.Eli Zaretskii2021-09-281-4/+5
|
* Don't quote nil and t in doc strings and commentsLars Ingebrigtsen2021-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/minibuf-tests.el (test-try-completion-ignore-case): * test/lisp/url/url-auth-tests.el (url-auth-test-digest-auth-retrieve-cache): * test/lisp/subr-tests.el (subr-tests-add-hook-depth): * test/lisp/so-long-tests/so-long-tests.el (so-long-tests-invisible-buffer-function): * test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort): * src/xfaces.c: * src/process.c (Finterrupt_process): (syms_of_process): * src/minibuf.c (Fread_from_minibuffer): (Fcompleting_read): (syms_of_minibuf): * src/dispnew.c (syms_of_display): * src/data.c: * lisp/so-long.el (so-long--hack-local-variables): * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): (elisp--xref-find-definitions): * lisp/org/ox-html.el (org-html-htmlize-output-type): * lisp/org/org-agenda.el (org-agenda-do-in-region): * lisp/net/tramp.el: * lisp/minibuffer.el (set-minibuffer-message): * lisp/isearch.el (isearch-wrap-pause): (isearch-repeat-on-direction-change): * lisp/emacs-lisp/timer.el (timer): * lisp/emacs-lisp/package.el (package-read-archive-contents): * lisp/emacs-lisp/faceup.el (faceup-next-property-change): * lisp/emacs-lisp/comp.el (comp-func): * lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p): * lisp/emacs-lisp/cl-macs.el (cl-do): (cl-do*): (cl--self-tco): * lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions): (byte-compile-cond-jump-table): Don't quote t and nil.
* Improve doc strings of a recent commitEli Zaretskii2021-09-181-2/+3
| | | | | | | | * lisp/emacs-lisp/generator.el (iter-defun): * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): * lisp/emacs-lisp/autoload.el (autoload-insert-section-header): Include description of arguments in the doc string's first line.
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-181-1/+1
|
* ; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.Eli Zaretskii2021-09-111-1/+1
|
* Add support for GCC compiler command-line optionsArthur Miller2021-09-101-0/+18
| | | | | | | | | * lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support for new 'native-comp-compiler-options'. * src/comp.c (Fcomp_native_compiler_options_effective_p): New function. (add_compiler_options): New function. (Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
* * Forward `comp-file-preloaded-p' to async workersAndrea Corallo2021-08-271-1/+2
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Forward `comp-file-preloaded-p' to async workers.