Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 3591:507f64624555
Apply typo patches from Paul Eggert.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 09 Jun 1993 11:59:12 +0000 |
parents | 7542bfc0a920 |
children | 974055b516d9 |
comparison
equal
deleted
inserted
replaced
3590:d5f22061277d | 3591:507f64624555 |
---|---|
141 ;;; | 141 ;;; |
142 ;;; o Forms like ((lambda ...) ...) are open-coded. | 142 ;;; o Forms like ((lambda ...) ...) are open-coded. |
143 ;;; | 143 ;;; |
144 ;;; o The form `eval-when-compile' is like progn, except that the body | 144 ;;; o The form `eval-when-compile' is like progn, except that the body |
145 ;;; is evaluated at compile-time. When it appears at top-level, this | 145 ;;; is evaluated at compile-time. When it appears at top-level, this |
146 ;;; is analagous to the Common Lisp idiom (eval-when (compile) ...). | 146 ;;; is analogous to the Common Lisp idiom (eval-when (compile) ...). |
147 ;;; When it does not appear at top-level, it is similar to the | 147 ;;; When it does not appear at top-level, it is similar to the |
148 ;;; Common Lisp #. reader macro (but not in interpreted code.) | 148 ;;; Common Lisp #. reader macro (but not in interpreted code.) |
149 ;;; | 149 ;;; |
150 ;;; o The form `eval-and-compile' is similar to eval-when-compile, but | 150 ;;; o The form `eval-and-compile' is similar to eval-when-compile, but |
151 ;;; the whole form is evalled both at compile-time and at run-time. | 151 ;;; the whole form is evalled both at compile-time and at run-time. |
405 (byte-defop 8 1 byte-varref "for variable reference") | 405 (byte-defop 8 1 byte-varref "for variable reference") |
406 (byte-defop 16 -1 byte-varset "for setting a variable") | 406 (byte-defop 16 -1 byte-varset "for setting a variable") |
407 (byte-defop 24 -1 byte-varbind "for binding a variable") | 407 (byte-defop 24 -1 byte-varbind "for binding a variable") |
408 (byte-defop 32 0 byte-call "for calling a function") | 408 (byte-defop 32 0 byte-call "for calling a function") |
409 (byte-defop 40 0 byte-unbind "for unbinding special bindings") | 409 (byte-defop 40 0 byte-unbind "for unbinding special bindings") |
410 ;; codes 8-47 are consumed by the preceeding opcodes | 410 ;; codes 8-47 are consumed by the preceding opcodes |
411 | 411 |
412 ;; unused: 48-55 | 412 ;; unused: 48-55 |
413 | 413 |
414 (byte-defop 56 -1 byte-nth) | 414 (byte-defop 56 -1 byte-nth) |
415 (byte-defop 57 0 byte-symbolp) | 415 (byte-defop 57 0 byte-symbolp) |
2203 | 2203 |
2204 ;; Compile a function that accepts one or more args and is right-associative. | 2204 ;; Compile a function that accepts one or more args and is right-associative. |
2205 (defun byte-compile-associative (form) | 2205 (defun byte-compile-associative (form) |
2206 (if (cdr form) | 2206 (if (cdr form) |
2207 (let ((opcode (get (car form) 'byte-opcode))) | 2207 (let ((opcode (get (car form) 'byte-opcode))) |
2208 ;; To compile all the args first may enable some optimizaions. | 2208 ;; To compile all the args first may enable some optimizations. |
2209 (mapcar 'byte-compile-form (setq form (cdr form))) | 2209 (mapcar 'byte-compile-form (setq form (cdr form))) |
2210 (while (setq form (cdr form)) | 2210 (while (setq form (cdr form)) |
2211 (byte-compile-out opcode 0))) | 2211 (byte-compile-out opcode 0))) |
2212 (byte-compile-constant (eval form)))) | 2212 (byte-compile-constant (eval form)))) |
2213 | 2213 |
2308 the syntax (function (lambda (...) ...)) instead."))))) | 2308 the syntax (function (lambda (...) ...)) instead."))))) |
2309 (byte-compile-two-args form)) | 2309 (byte-compile-two-args form)) |
2310 | 2310 |
2311 (defun byte-compile-funarg (form) | 2311 (defun byte-compile-funarg (form) |
2312 ;; (mapcar '(lambda (x) ..) ..) ==> (mapcar (function (lambda (x) ..)) ..) | 2312 ;; (mapcar '(lambda (x) ..) ..) ==> (mapcar (function (lambda (x) ..)) ..) |
2313 ;; for cases where it's guarenteed that first arg will be used as a lambda. | 2313 ;; for cases where it's guaranteed that first arg will be used as a lambda. |
2314 (byte-compile-normal-call | 2314 (byte-compile-normal-call |
2315 (let ((fn (nth 1 form))) | 2315 (let ((fn (nth 1 form))) |
2316 (if (and (eq (car-safe fn) 'quote) | 2316 (if (and (eq (car-safe fn) 'quote) |
2317 (eq (car-safe (nth 1 fn)) 'lambda)) | 2317 (eq (car-safe (nth 1 fn)) 'lambda)) |
2318 (cons (car form) | 2318 (cons (car form) |