summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
Commit message (Collapse)AuthorAgeFilesLines
* Allow per function speed declarationAndrea Corallo2020-06-221-1/+7
| | | | | | | | | | | | | | | | | | | | | * src/comp.c (COMP_SPEED): Rename. (comp_t): Add 'func_speed' field. (emit_mvar_lval, compile_function): Update for per function speed. (Fcomp__compile_ctxt_to_file): COMP_SPEED renamed. * lisp/emacs-lisp/comp.el (comp-speed): Doc update. (comp-func): New 'speed' slot. (comp-spill-speed): New function. (comp-spill-lap-function, comp-intern-func-in-ctxt): Fill 'speed' slot. (comp-spill-lap-function): Gate -1 speed functions for native compilation and emit bytecode instead. (comp-spill-lap): Close over `byte-to-native-plist-environment'. (comp-latch-make-fill): Update for per function speed. (comp-limplify-top-level): Fill speed. (comp-propagate1, comp-call-optim-form-call, comp-call-optim) (comp-dead-code, comp-tco, comp-remove-type-hints): Update for per function speed.
* Execute top level forms in the right lex/dyn scope.Andrea Corallo2020-06-221-3/+4
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-to-native-top-level): Add 'lexical' slot. (byte-compile-output-file-form): Update for new slot. (byte-compile-file-form-defmumble): Capture scope. * lisp/emacs-lisp/comp.el (comp-emit-for-top-level): Specify execution scope.
* Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-06-041-3/+4
|\
| * Merge from origin/emacs-27Paul Eggert2020-06-011-3/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi... 68b6dad1d8 Be more aggressive in marking objects during GC 36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo. cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m... 41232e6797 Avoid crashes due to bidi cache being reset during redisplay f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ... d3e0023aaa ; * etc/TODO: Fix formatting. (Bug#41497) a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve' # Conflicts: # lisp/tab-bar.el # nt/inc/ms-w32.h # src/alloc.c
| | * Fix bug #41618 "(byte-compile 'foo) errors when foo is a macro."Alan Mackenzie2020-05-311-3/+4
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile): Disentangle the eval of the final form from the pushing of 'macro onto it, doing the former first.
* | | Update spill LAP machinery and compile anonymous lambdasAndrea Corallo2020-05-141-31/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-spill-lap-function): Make use of byte-to-native-lambdas-h and update for 'byte-to-native-func-def'. (comp-spill-lap-function): Rework logic to retrive LAP using 'byte-to-native-lambdas-h'. (comp-emit-for-top-level): Update for 'byte-to-native-function'. * lisp/emacs-lisp/bytecomp.el: Add commentary on new spill LAP mechanism. (byte-to-native-lambda, byte-to-native-func-def): New structures. (byte-to-native-top-level): Indent. (byte-to-native-lambdas-h): Update doc. (byte-compile-lapcode): Add a 'byte-to-native-lambda' instance into byte-to-native-lambdas-h instead of just LAP. (byte-compile-file-form-defmumble): Store into 'byte-to-native-func-def' only the byte compiled function, the LAP will be retrived through 'byte-to-native-lambdas-h'. (byte-compile-lambda): Return the byte compiled function.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-05-041-0/+8
|\| |
| * | Make `make-local-variable' declare the var locally dynamicMichael Heerdegen2020-04-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | The only effect of this change is to get rid of some unnecessary "assignment to free variable" warnings. * lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New function.
* | | Rework spill LAP mechanism in preparation of compiling lambdas.Andrea Corallo2020-04-261-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-spill-lap-function): No need anymore to have `byte-native-compiling' bound to free-func. (comp-spill-lap-function): Make use of `byte-to-native-lap-h' and clean-up. (comp-spill-lap-function): Likewise. * lisp/emacs-lisp/bytecomp.el (byte-to-native-function): Add lap slot. (byte-to-native-lap): Rename into byte-to-native-lap-h. (byte-compile-lapcode): Spill lap after having int assembled and store it into `byte-to-native-lap-h'. (byte-compile-not-top-level): Remove. (byte-compile-file-form-defmumble): Fill directly lap slot. (byte-compile-lambda): Remove `byte-compile-not-top-level'. (byte-compile-out-toplevel): Restore original code. (byte-compile-form): Remove `byte-compile-not-top-level'. (byte-compile-function-form): Likewise. (byte-compile-flush-pending): No need anymore to set `byte-compile-current-form' so restore orignal code.
* | | * lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): Add comp.elnAndrea Corallo2020-04-231-2/+3
| | |
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-04-231-1/+1
|\| |
| * | Merge from origin/emacs-27Glenn Morris2020-04-201-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 05089a4d65 (origin/emacs-27) Tweak wording re constant variables a1040861f1 Tweak setcar-related wording 751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend... 9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor... e1d42da0d6 Fix mutability glitches reported by Drew Adams 5805df74f5 Improve mutability doc dca35b31d0 Improve mutability documentation 81e7d7f111 Document that quoting yields constants 5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu... 14a570afae Remove #' and function quoting from lambda forms in manual d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ... 4df8a61117 Add new node "Image Mode" to Emacs Manual. d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701) 5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo. eebfb72c90 Document constant vs mutable objects better 6c187ed6b0 Improve documentation of 'sort-lines' 52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta... 067b070598 ; Fix some typos and doc issues (bug#40695) # Conflicts: # etc/NEWS
| | * ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-181-1/+1
| | |
* | | Fix free function compilationAndrea Corallo2020-03-291-1/+2
| | |
* | | Prevent collisions in C namespace and function shadowingAndrea Corallo2020-03-291-4/+10
| | | | | | | | | | | | | | | This rework make functions being indexed by their unique C symbol name preventing multiple lisp function with the same name colliding.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-03-091-53/+15
|\| |
| * | * lisp/emacs-lisp/bytecomp.el: Drop warning for loading into Emacs<23Stefan Monnier2020-03-071-53/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stash the major version of the compiling Emacs such that the loading Emacs can later detect when loading a file compiled by a too-new Emacs. (byte-compile-fix-header): Remove. (byte-compile-from-buffer): Don't call it any more. (byte-compile-insert-header): Stash the emacs-major-version in it. Don't leave space for `byte-compile-fix-header`.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-02-261-2/+10
|\| |
| * | Generate 'substring' byte op (bug#39709)Mattias Engdegård2020-02-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'substring' byte op was not emitted, apparently by mistake. Fix. Suggested by Mark Oteiza <mvoteiza@udel.edu>. * lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add '1-3' clause. (byte-compile-one-to-three-args): New. * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops): Add 'byte-substring'. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data): Test 'substring'.
| * | Add 'nofollow' flag to set-file-modes etc.Paul Eggert2020-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids some race conditions (Bug#39683). E.g., if some other program changes a file to a symlink between the time Emacs creates the file and the time it changes the file’s permissions, using the new flag prevents Emacs from inadvertently changing the permissions of a victim in some completely unrelated directory. * admin/merge-gnulib (GNULIB_MODULES): Add fchmodat. * doc/lispref/files.texi (Testing Accessibility, Changing Files): * doc/lispref/os.texi (File Notifications): * etc/NEWS: Adjust documentation accordingly. * lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4: * m4/lchmod.m4: New files, copied from Gnulib. * lib/gnulib.mk.in: Regenerate. * lisp/dired-aux.el (dired-do-chmod): * lisp/doc-view.el (doc-view-make-safe-dir): * lisp/emacs-lisp/autoload.el (autoload--save-buffer): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/eshell/em-pred.el (eshell-pred-file-mode): * lisp/files.el (backup-buffer-copy, copy-directory): * lisp/gnus/mail-source.el (mail-source-movemail): * lisp/gnus/mm-decode.el (mm-display-external): * lisp/gnus/nnmail.el (nnmail-write-region): * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region): * lisp/net/tramp.el (tramp-handle-write-region) (tramp-make-tramp-temp-file): * lisp/server.el (server-ensure-safe-dir): * lisp/url/url-util.el (url-make-private-file): When getting or setting file modes, avoid following symbolic links when the file is not supposed to be a symbolic link. * lisp/doc-view.el (doc-view-make-safe-dir): Omit no-longer-needed separate symlink test. * lisp/gnus/gnus-util.el (gnus-set-file-modes): * lisp/net/tramp.el (tramp-handle-file-modes): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): * src/fileio.c (symlink_nofollow_flag): New function. (Ffile_modes, Fset_file_modes): Support an optional FLAG arg. All C callers changed. * lisp/net/ange-ftp.el (ange-ftp-set-file-modes): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * m4/gnulib-comp.m4: Regenerate.
* | | Make build process robust against interruptionsAndrea Corallo2020-02-231-6/+15
| | | | | | | | | | | | | | | | | | During boo-strap we produce both the .eln and the .elc together. Because the make target is the later this has to be produced as last to be resilient to build interruptions.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-02-141-2/+1
|\| |
| * | Silence byte-compiler warningStefan Kangas2020-02-051-2/+1
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header): Silence byte-compiler warning about "Unused lexical variable".
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-02-041-116/+43
|\| |
| * | Unbreak byte compilationGlenn Morris2020-01-231-30/+31
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header): Update for recent header changes. (byte-compile-insert-header): Add more padding.
| * | Remove irrelevant info from .elc headersStefan Kangas2020-01-231-5/+1
| | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header): Don't insert information on ancient Emacs in bytecode headers. (Bug#39233)
| * | Add space before messsage in byte compiler warningsRüdiger Sonderfeld2020-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the GNU coding standards (info "(standards) Errors"): > If you want to mention the column number, use one of these formats: > SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE > SOURCE-FILE-NAME:LINENO.COLUMN: MESSAGE * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Add space before message in byte compiler warnings to comply with the GNU coding standards. (Bug#18969)
| * | Mark 'catch' and 'condition-case' bytecodes as obsoleteMattias Engdegård2020-01-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | They have not been generated by the byte-compiler since Emacs 25. * lisp/emacs-lisp/bytecomp.el (byte-catch, byte-condition-case): * src/bytecode.c (BYTE_CODES, exec_byte_code): Mark as obsolete (since Emacs 25; they were still generated in 24.4).
| * | Remove generation of old bytecodes for catch/unwindMattias Engdegård2020-01-051-78/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--use-old-handlers) (byte-compile-condition-case, byte-compile-condition-case--old): Remove. (byte-compile-condition-case--new): Rename to byte-compile-condition-case. (byte-compile-catch, byte-compile-unwind-protect): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Simplify.
* | | Fix bytecomp message when native compilingAndrea Corallo2020-01-021-2/+4
| | |
* | | add batch-byte-native-compile-for-bootstrapAndrea Corallo2020-01-011-2/+5
| | |
* | | spill also interactive functionsAndrea Corallo2020-01-011-4/+1
| | |
* | | do not emit elc file while native compilingAndrea Corallo2020-01-011-1/+3
| | |
* | | revert unnecessary modificationsAndrea Corallo2020-01-011-1/+0
| | |
* | | fix single function compilationAndrea Corallo2020-01-011-3/+2
| | |
* | | do not native compile interactive functionsAndrea Corallo2020-01-011-1/+4
| | |
* | | fix top level macro generationAndrea Corallo2020-01-011-1/+1
| | |
* | | rework bytecomp spill codeAndrea Corallo2020-01-011-14/+23
| | |
* | | fix compilation of devar defconst with doc stringAndrea Corallo2020-01-011-1/+1
| | |
* | | rework lap spillingAndrea Corallo2020-01-011-7/+15
| | |
* | | fix single function compilationAndrea Corallo2020-01-011-3/+3
| | |
* | | fix lambda handling and add a test for thatAndrea Corallo2020-01-011-7/+5
| | |
* | | initial top level support (defvar working)Andrea Corallo2020-01-011-0/+4
| | |
* | | basic file compilation workingAndrea Corallo2020-01-011-4/+8
| | |
* | | generalize code into comp.el for compile multiple funcitonsAndrea Corallo2020-01-011-6/+8
| | |
* | | prepare for file compilationAndrea Corallo2020-01-011-4/+6
| | |
* | | some order into special varsAndrea Corallo2020-01-011-1/+4
| | |
* | | working on comp.elAndrea Corallo2020-01-011-0/+1
| | |
* | | spill lapAndrea Corallo2020-01-011-0/+3
|/ /
* | Merge from origin/emacs-27Paul Eggert2020-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | 186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3 4cd143aded Fix copyright years by hand 365e01cc9f Update copyright year to 2020 cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac... # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex