diff options
author | Andrea Corallo <akrl@sdf.org> | 2019-12-29 14:10:19 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-01 11:38:18 +0100 |
commit | e666bf781f1d3d74068e8d2b505e35dd75b5b423 (patch) | |
tree | 45aaacf2c8417f243729dab63b08c18e57aa0894 /lisp/emacs-lisp/comp.el | |
parent | 00f7fd7d427b85e69a53403a1d10ac122a92a95d (diff) | |
download | emacs-e666bf781f1d3d74068e8d2b505e35dd75b5b423.tar.gz emacs-e666bf781f1d3d74068e8d2b505e35dd75b5b423.tar.bz2 emacs-e666bf781f1d3d74068e8d2b505e35dd75b5b423.zip |
add customize comp-never-optimize-functions
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b212f24bf9c..99cc93580bf 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -74,6 +74,15 @@ This intended for debugging the compiler itself. :type 'boolean :group 'comp) +(defcustom comp-never-optimize-functions + '(macroexpand scroll-down scroll-up narrow-to-region widen rename-buffer + make-indirect-buffer delete-file top-level abort-recursive-edit) + "Primitive functions for which we do not perform trampoline optimization. +This is especially usefull for primitives known to be advised if bootstrap is +performed at `comp-speed' > 0." + :type 'list + :group 'comp) + (defconst comp-log-buffer-name "*Native-compile-Log*" "Name of the native-compiler log buffer.") @@ -1631,7 +1640,8 @@ Return t if something was changed." (setf (comp-mvar-ref arg) nil)) args) args)) - (when (symbolp callee) ; Do nothing if callee is a byte compiled func. + (when (and (symbolp callee) ; Do nothing if callee is a byte compiled func. + (not (member callee comp-never-optimize-functions))) (let* ((f (symbol-function callee)) (subrp (subrp f)) (callee-in-unit (gethash callee |