Mercurial > hg > xemacs-beta
comparison lisp/bytecomp-runtime.el @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 6330739388db |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
53 They will only be compiled open-coded when `byte-optimize' is true." | 53 They will only be compiled open-coded when `byte-optimize' is true." |
54 (cons 'eval-and-compile | 54 (cons 'eval-and-compile |
55 (apply | 55 (apply |
56 'nconc | 56 'nconc |
57 (mapcar | 57 (mapcar |
58 '(lambda (x) | 58 #'(lambda (x) |
59 (` ((or (memq (get '(, x) 'byte-optimizer) | 59 `((or (memq (get ',x 'byte-optimizer) |
60 '(nil byte-compile-inline-expand)) | 60 '(nil byte-compile-inline-expand)) |
61 (error | 61 (error |
62 "%s already has a byte-optimizer, can't make it inline" | 62 "%s already has a byte-optimizer, can't make it inline" |
63 '(, x))) | 63 ',x)) |
64 (put '(, x) 'byte-optimizer 'byte-compile-inline-expand)))) | 64 (put ',x 'byte-optimizer 'byte-compile-inline-expand))) |
65 fns)))) | 65 fns)))) |
66 | 66 |
67 | 67 |
68 (defmacro proclaim-notinline (&rest fns) | 68 (defmacro proclaim-notinline (&rest fns) |
69 "Cause the named functions to no longer be open-coded." | 69 "Cause the named functions to no longer be open-coded." |
70 (cons 'eval-and-compile | 70 (cons 'eval-and-compile |
71 (apply | 71 (apply |
72 'nconc | 72 'nconc |
73 (mapcar | 73 (mapcar |
74 '(lambda (x) | 74 #'(lambda (x) |
75 (` ((if (eq (get '(, x) 'byte-optimizer) | 75 `((if (eq (get ',x 'byte-optimizer) |
76 'byte-compile-inline-expand) | 76 'byte-compile-inline-expand) |
77 (put '(, x) 'byte-optimizer nil))))) | 77 (put ',x 'byte-optimizer nil)))) |
78 fns)))) | 78 fns)))) |
79 | 79 |
80 ;; This has a special byte-hunk-handler in bytecomp.el. | 80 ;; This has a special byte-hunk-handler in bytecomp.el. |
81 (defmacro defsubst (name arglist &rest body) | 81 (defmacro defsubst (name arglist &rest body) |
82 "Define an inline function. The syntax is just like that of `defun'." | 82 "Define an inline function. The syntax is just like that of `defun'." |
176 "Run the body forms when FEATURE is featurep, be it now or later. | 176 "Run the body forms when FEATURE is featurep, be it now or later. |
177 Called (eval-when-feature (FEATURE [. FILENAME]) BODYFORMS...). | 177 Called (eval-when-feature (FEATURE [. FILENAME]) BODYFORMS...). |
178 If (featurep 'FEATURE), evals now; otherwise adds an elt to | 178 If (featurep 'FEATURE), evals now; otherwise adds an elt to |
179 `after-load-alist' (which see), using FEATURE as filename if FILENAME is nil." | 179 `after-load-alist' (which see), using FEATURE as filename if FILENAME is nil." |
180 (let ((file (or (cdr feature) (symbol-name (car feature))))) | 180 (let ((file (or (cdr feature) (symbol-name (car feature))))) |
181 `(let ((bodythunk (function (lambda () ,@body)))) | 181 `(let ((bodythunk #'(lambda () ,@body))) |
182 (if (featurep ',(car feature)) | 182 (if (featurep ',(car feature)) |
183 (funcall bodythunk) | 183 (funcall bodythunk) |
184 (setq after-load-alist (cons '(,file . (list 'lambda '() bodythunk)) | 184 (setq after-load-alist (cons '(,file . (list 'lambda '() bodythunk)) |
185 after-load-alist)))))) | 185 after-load-alist)))))) |
186 | 186 |