emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el
Date: Mon, 24 Jun 2002 21:09:53 -0400

Index: emacs/lisp/emacs-lisp/bytecomp.el
diff -c emacs/lisp/emacs-lisp/bytecomp.el:2.99 
emacs/lisp/emacs-lisp/bytecomp.el:2.100
*** emacs/lisp/emacs-lisp/bytecomp.el:2.99      Sat Jun 15 16:37:01 2002
--- emacs/lisp/emacs-lisp/bytecomp.el   Mon Jun 24 21:09:52 2002
***************
*** 10,16 ****
  
  ;;; This version incorporates changes up to version 2.10 of the
  ;;; Zawinski-Furuseth compiler.
! (defconst byte-compile-version "$Revision: 2.99 $")
  
  ;; This file is part of GNU Emacs.
  
--- 10,16 ----
  
  ;;; This version incorporates changes up to version 2.10 of the
  ;;; Zawinski-Furuseth compiler.
! (defconst byte-compile-version "$Revision: 2.100 $")
  
  ;; This file is part of GNU Emacs.
  
***************
*** 1113,1133 ****
           (if (< ncall (car sig))
               "requires"
             "accepts only")
!          (byte-compile-arglist-signature-string sig)))
!       (or (and (fboundp (car form))   ; might be a subr or autoload.
!              (not (get (car form) 'byte-compile-noruntime)))
!         (eq (car form) byte-compile-current-form) ; ## this doesn't work
!                                                   ; with recursion.
!         ;; It's a currently-undefined function.
!         ;; Remember number of args in call.
!         (let ((cons (assq (car form) byte-compile-unresolved-functions))
!               (n (length (cdr form))))
!           (if cons
!               (or (memq n (cdr cons))
!                   (setcdr cons (cons n (cdr cons))))
!               (setq byte-compile-unresolved-functions
!                     (cons (list (car form) n)
!                           byte-compile-unresolved-functions))))))))
  
  ;; Warn if the function or macro is being redefined with a different
  ;; number of arguments.
--- 1113,1135 ----
           (if (< ncall (car sig))
               "requires"
             "accepts only")
!          (byte-compile-arglist-signature-string sig))))
!     ;; Check to see if the function will be available at runtime
!     ;; and/or remember its arity if it's unknown.
!     (or (and (or sig (fboundp (car form))) ; might be a subr or autoload.
!            (not (get (car form) 'byte-compile-noruntime)))
!       (eq (car form) byte-compile-current-form) ; ## this doesn't work
!                                       ; with recursion.
!       ;; It's a currently-undefined function.
!       ;; Remember number of args in call.
!       (let ((cons (assq (car form) byte-compile-unresolved-functions))
!             (n (length (cdr form))))
!         (if cons
!             (or (memq n (cdr cons))
!                 (setcdr cons (cons n (cdr cons))))
!           (setq byte-compile-unresolved-functions
!                 (cons (list (car form) n)
!                       byte-compile-unresolved-functions)))))))
  
  ;; Warn if the function or macro is being redefined with a different
  ;; number of arguments.
***************
*** 1492,1498 ****
                    ;; the build tree, without causing problems when emacs-lisp
                    ;; files in the build tree are recompiled).
                    (delete-file target-file))
!                 (write-region 1 (point-max) target-file))
              ;; This is just to give a better error message than write-region
              (signal 'file-error
                      (list "Opening output file"
--- 1494,1500 ----
                    ;; the build tree, without causing problems when emacs-lisp
                    ;; files in the build tree are recompiled).
                    (delete-file target-file))
!                 (write-region (point-min) (point-max) target-file))
              ;; This is just to give a better error message than write-region
              (signal 'file-error
                      (list "Opening output file"
***************
*** 1809,1815 ****
                (setq position
                      (byte-compile-output-as-comment
                       (nth (nth 1 info) form) nil))
!               (setq position (position-bytes position))
                ;; If the doc string starts with * (a user variable),
                ;; negate POSITION.
                (if (and (stringp (nth (nth 1 info) form))
--- 1811,1817 ----
                (setq position
                      (byte-compile-output-as-comment
                       (nth (nth 1 info) form) nil))
!               (setq position (- (position-bytes position) (point-min) -1))
                ;; If the doc string starts with * (a user variable),
                ;; negate POSITION.
                (if (and (stringp (nth (nth 1 info) form))
***************
*** 1843,1849 ****
                           (byte-compile-output-as-comment
                            (cons (car form) (nth 1 form))
                            t)))
!                     (setq position (position-bytes position))
                      (princ (format "(#$ . %d) nil" position) outbuffer)
                      (setq form (cdr form))
                      (setq index (1+ index))))
--- 1845,1851 ----
                           (byte-compile-output-as-comment
                            (cons (car form) (nth 1 form))
                            t)))
!                     (setq position (- (position-bytes position) (point-min) 
-1))
                      (princ (format "(#$ . %d) nil" position) outbuffer)
                      (setq form (cdr form))
                      (setq index (1+ index))))
***************
*** 2404,2413 ****
         ;; constant was not optimized away because we chose to return it.
         (and (not (assq nil byte-compile-constants)) ; Nil is often there.
              (let ((tmp (reverse byte-compile-constants)))
!               (while (and tmp (not (or (symbolp (car (car tmp)))
!                                        (numberp (car (car tmp))))))
                  (setq tmp (cdr tmp)))
!               (car (car tmp)))))))
    (byte-compile-out 'byte-return 0)
    (setq byte-compile-output (nreverse byte-compile-output))
    (if (memq byte-optimize '(t byte))
--- 2406,2415 ----
         ;; constant was not optimized away because we chose to return it.
         (and (not (assq nil byte-compile-constants)) ; Nil is often there.
              (let ((tmp (reverse byte-compile-constants)))
!               (while (and tmp (not (or (symbolp (caar tmp))
!                                        (numberp (caar tmp)))))
                  (setq tmp (cdr tmp)))
!               (caar tmp))))))
    (byte-compile-out 'byte-return 0)
    (setq byte-compile-output (nreverse byte-compile-output))
    (if (memq byte-optimize '(t byte))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]