/[emacs]/emacs/lisp/emacs-lisp/bytecomp.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/bytecomp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.99 by rms, Sat Jun 15 20:37:01 2002 UTC revision 2.100 by monnier, Tue Jun 25 01:09:52 2002 UTC
# Line 1113  Each function's symbol gets marked with Line 1113  Each function's symbol gets marked with
1113             (if (< ncall (car sig))             (if (< ncall (car sig))
1114                 "requires"                 "requires"
1115               "accepts only")               "accepts only")
1116             (byte-compile-arglist-signature-string sig)))             (byte-compile-arglist-signature-string sig))))
1117        (or (and (fboundp (car form))     ; might be a subr or autoload.      ;; Check to see if the function will be available at runtime
1118                 (not (get (car form) 'byte-compile-noruntime)))      ;; and/or remember its arity if it's unknown.
1119            (eq (car form) byte-compile-current-form) ; ## this doesn't work      (or (and (or sig (fboundp (car form))) ; might be a subr or autoload.
1120                                                      ; with recursion.               (not (get (car form) 'byte-compile-noruntime)))
1121            ;; It's a currently-undefined function.          (eq (car form) byte-compile-current-form) ; ## this doesn't work
1122            ;; Remember number of args in call.                                          ; with recursion.
1123            (let ((cons (assq (car form) byte-compile-unresolved-functions))          ;; It's a currently-undefined function.
1124                  (n (length (cdr form))))          ;; Remember number of args in call.
1125              (if cons          (let ((cons (assq (car form) byte-compile-unresolved-functions))
1126                  (or (memq n (cdr cons))                (n (length (cdr form))))
1127                      (setcdr cons (cons n (cdr cons))))            (if cons
1128                  (setq byte-compile-unresolved-functions                (or (memq n (cdr cons))
1129                        (cons (list (car form) n)                    (setcdr cons (cons n (cdr cons))))
1130                              byte-compile-unresolved-functions))))))))              (setq byte-compile-unresolved-functions
1131                      (cons (list (car form) n)
1132                            byte-compile-unresolved-functions)))))))
1133    
1134  ;; Warn if the function or macro is being redefined with a different  ;; Warn if the function or macro is being redefined with a different
1135  ;; number of arguments.  ;; number of arguments.
# Line 1492  The value is non-nil if there were no er Line 1494  The value is non-nil if there were no er
1494                      ;; the build tree, without causing problems when emacs-lisp                      ;; the build tree, without causing problems when emacs-lisp
1495                      ;; files in the build tree are recompiled).                      ;; files in the build tree are recompiled).
1496                      (delete-file target-file))                      (delete-file target-file))
1497                    (write-region 1 (point-max) target-file))                    (write-region (point-min) (point-max) target-file))
1498                ;; This is just to give a better error message than write-region                ;; This is just to give a better error message than write-region
1499                (signal 'file-error                (signal 'file-error
1500                        (list "Opening output file"                        (list "Opening output file"
# Line 1809  list that represents a doc string refere Line 1811  list that represents a doc string refere
1811                  (setq position                  (setq position
1812                        (byte-compile-output-as-comment                        (byte-compile-output-as-comment
1813                         (nth (nth 1 info) form) nil))                         (nth (nth 1 info) form) nil))
1814                  (setq position (position-bytes position))                  (setq position (- (position-bytes position) (point-min) -1))
1815                  ;; If the doc string starts with * (a user variable),                  ;; If the doc string starts with * (a user variable),
1816                  ;; negate POSITION.                  ;; negate POSITION.
1817                  (if (and (stringp (nth (nth 1 info) form))                  (if (and (stringp (nth (nth 1 info) form))
# Line 1843  list that represents a doc string refere Line 1845  list that represents a doc string refere
1845                             (byte-compile-output-as-comment                             (byte-compile-output-as-comment
1846                              (cons (car form) (nth 1 form))                              (cons (car form) (nth 1 form))
1847                              t)))                              t)))
1848                        (setq position (position-bytes position))                        (setq position (- (position-bytes position) (point-min) -1))
1849                        (princ (format "(#$ . %d) nil" position) outbuffer)                        (princ (format "(#$ . %d) nil" position) outbuffer)
1850                        (setq form (cdr form))                        (setq form (cdr form))
1851                        (setq index (1+ index))))                        (setq index (1+ index))))
# Line 2404  If FORM is a lambda or a macro, byte-com Line 2406  If FORM is a lambda or a macro, byte-com
2406           ;; constant was not optimized away because we chose to return it.           ;; constant was not optimized away because we chose to return it.
2407           (and (not (assq nil byte-compile-constants)) ; Nil is often there.           (and (not (assq nil byte-compile-constants)) ; Nil is often there.
2408                (let ((tmp (reverse byte-compile-constants)))                (let ((tmp (reverse byte-compile-constants)))
2409                  (while (and tmp (not (or (symbolp (car (car tmp)))                  (while (and tmp (not (or (symbolp (caar tmp))
2410                                           (numberp (car (car tmp))))))                                           (numberp (caar tmp)))))
2411                    (setq tmp (cdr tmp)))                    (setq tmp (cdr tmp)))
2412                  (car (car tmp)))))))                  (caar tmp))))))
2413    (byte-compile-out 'byte-return 0)    (byte-compile-out 'byte-return 0)
2414    (setq byte-compile-output (nreverse byte-compile-output))    (setq byte-compile-output (nreverse byte-compile-output))
2415    (if (memq byte-optimize '(t byte))    (if (memq byte-optimize '(t byte))

Legend:
Removed from v.2.99  
changed lines
  Added in v.2.100

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26