diff options
author | Robin Templeton <[email protected]> | 2014-06-22 00:42:29 -0400 |
---|---|---|
committer | Robin Templeton <[email protected]> | 2015-04-20 00:29:01 -0400 |
commit | f208afd539a97efa1dd94686ff3d2c2ebfd09944 (patch) | |
tree | 73aef7f11b5f7fab4cafd019024bb0b364f75151 /lisp | |
parent | b139508b6f9b1cd6828c21d2c82422e2ef5648d0 (diff) |
bytecomp changes
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9c52cc44eb..43742c2e0d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2542,41 +2542,7 @@ FUN should be either a `lambda' value or a `closure' value." (defun byte-compile (form) "If FORM is a symbol, byte-compile its function definition. If FORM is a lambda or a macro, byte-compile it as a function." - (displaying-byte-compile-warnings - (byte-compile-close-variables - (let* ((lexical-binding lexical-binding) - (fun (if (symbolp form) - (symbol-function form) - form)) - (macro (eq (car-safe fun) 'macro))) - (if macro - (setq fun (cdr fun))) - (cond - ;; Up until Emacs-24.1, byte-compile silently did nothing when asked to - ;; compile something invalid. So let's tune down the complaint from an - ;; error to a simple message for the known case where signaling an error - ;; causes problems. - ((byte-code-function-p fun) - (message "Function %s is already compiled" - (if (symbolp form) form "provided")) - fun) - (t - (when (symbolp form) - (unless (memq (car-safe fun) '(closure lambda)) - (error "Don't know how to compile %S" fun)) - (setq lexical-binding (eq (car fun) 'closure)) - (setq fun (byte-compile--reify-function fun))) - (unless (eq (car-safe fun) 'lambda) - (error "Don't know how to compile %S" fun)) - ;; Expand macros. - (setq fun (byte-compile-preprocess fun)) - ;; Get rid of the `function' quote added by the `lambda' macro. - (if (eq (car-safe fun) 'function) (setq fun (cadr fun))) - (setq fun (byte-compile-lambda fun)) - (if macro (push 'macro fun)) - (if (symbolp form) - (fset form fun) - fun))))))) + form) (defun byte-compile-sexp (sexp) "Compile and return SEXP." @@ -4779,28 +4745,6 @@ and corresponding effects." (insert (int-to-string n) "\n"))) (setq i (1+ i)))))) -;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles -;; itself, compile some of its most used recursive functions (at load time). -;; -(eval-when-compile - (or (byte-code-function-p (symbol-function 'byte-compile-form)) - (assq 'byte-code (symbol-function 'byte-compile-form)) - (let ((byte-optimize nil) ; do it fast - (byte-compile-warnings nil)) - (mapc (lambda (x) - (or noninteractive (message "compiling %s..." x)) - (byte-compile x) - (or noninteractive (message "compiling %s...done" x))) - '(byte-compile-normal-call - byte-compile-form - byte-compile-body - ;; Inserted some more than necessary, to speed it up. - byte-compile-top-level - byte-compile-out-toplevel - byte-compile-constant - byte-compile-variable-ref)))) - nil) - (run-hooks 'bytecomp-load-hook) ;;; bytecomp.el ends here |