Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 51289:ba101d1e9521
(byte-compile-no-warnings): New function.
(with-no-warnings): Set up compile handler.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 28 May 2003 11:26:45 +0000 |
parents | 1bd0d75dbaa9 |
children | 10cd0bec4a7f |
comparison
equal
deleted
inserted
replaced
51288:f0563005bb3d | 51289:ba101d1e9521 |
---|---|
8 ;; Maintainer: FSF | 8 ;; Maintainer: FSF |
9 ;; Keywords: lisp | 9 ;; Keywords: lisp |
10 | 10 |
11 ;;; This version incorporates changes up to version 2.10 of the | 11 ;;; This version incorporates changes up to version 2.10 of the |
12 ;;; Zawinski-Furuseth compiler. | 12 ;;; Zawinski-Furuseth compiler. |
13 (defconst byte-compile-version "$Revision: 2.131 $") | 13 (defconst byte-compile-version "$Revision: 2.133 $") |
14 | 14 |
15 ;; This file is part of GNU Emacs. | 15 ;; This file is part of GNU Emacs. |
16 | 16 |
17 ;; GNU Emacs is free software; you can redistribute it and/or modify | 17 ;; GNU Emacs is free software; you can redistribute it and/or modify |
18 ;; it under the terms of the GNU General Public License as published by | 18 ;; it under the terms of the GNU General Public License as published by |
2761 (defmacro byte-defop-compiler (function &optional compile-handler) | 2761 (defmacro byte-defop-compiler (function &optional compile-handler) |
2762 ;; add a compiler-form for FUNCTION. | 2762 ;; add a compiler-form for FUNCTION. |
2763 ;; If function is a symbol, then the variable "byte-SYMBOL" must name | 2763 ;; If function is a symbol, then the variable "byte-SYMBOL" must name |
2764 ;; the opcode to be used. If function is a list, the first element | 2764 ;; the opcode to be used. If function is a list, the first element |
2765 ;; is the function and the second element is the bytecode-symbol. | 2765 ;; is the function and the second element is the bytecode-symbol. |
2766 ;; The second element may be nil, meaning there is no opcode. | |
2766 ;; COMPILE-HANDLER is the function to use to compile this byte-op, or | 2767 ;; COMPILE-HANDLER is the function to use to compile this byte-op, or |
2767 ;; may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. | 2768 ;; may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. |
2768 ;; If it is nil, then the handler is "byte-compile-SYMBOL." | 2769 ;; If it is nil, then the handler is "byte-compile-SYMBOL." |
2769 (let (opcode) | 2770 (let (opcode) |
2770 (if (symbolp function) | 2771 (if (symbolp function) |
3526 (defun byte-compile-with-output-to-temp-buffer (form) | 3527 (defun byte-compile-with-output-to-temp-buffer (form) |
3527 (byte-compile-form (car (cdr form))) | 3528 (byte-compile-form (car (cdr form))) |
3528 (byte-compile-out 'byte-temp-output-buffer-setup 0) | 3529 (byte-compile-out 'byte-temp-output-buffer-setup 0) |
3529 (byte-compile-body (cdr (cdr form))) | 3530 (byte-compile-body (cdr (cdr form))) |
3530 (byte-compile-out 'byte-temp-output-buffer-show 0)) | 3531 (byte-compile-out 'byte-temp-output-buffer-show 0)) |
3531 | |
3532 | 3532 |
3533 ;;; top-level forms elsewhere | 3533 ;;; top-level forms elsewhere |
3534 | 3534 |
3535 (byte-defop-compiler-1 defun) | 3535 (byte-defop-compiler-1 defun) |
3536 (byte-defop-compiler-1 defmacro) | 3536 (byte-defop-compiler-1 defmacro) |
3663 (defun byte-compile-defalias-warn (new) | 3663 (defun byte-compile-defalias-warn (new) |
3664 (let ((calls (assq new byte-compile-unresolved-functions))) | 3664 (let ((calls (assq new byte-compile-unresolved-functions))) |
3665 (if calls | 3665 (if calls |
3666 (setq byte-compile-unresolved-functions | 3666 (setq byte-compile-unresolved-functions |
3667 (delq calls byte-compile-unresolved-functions))))) | 3667 (delq calls byte-compile-unresolved-functions))))) |
3668 | |
3669 (byte-defop-compiler-1 with-no-warnings byte-compile-no-warnings) | |
3670 (defun byte-compile-no-warnings (form) | |
3671 (let (byte-compile-warnings) | |
3672 (byte-compile-form (cadr form)))) | |
3668 | 3673 |
3669 ;;; tags | 3674 ;;; tags |
3670 | 3675 |
3671 ;; Note: Most operations will strip off the 'TAG, but it speeds up | 3676 ;; Note: Most operations will strip off the 'TAG, but it speeds up |
3672 ;; optimization to have the 'TAG as a part of the tag. | 3677 ;; optimization to have the 'TAG as a part of the tag. |