Mercurial > emacs
comparison lisp/emacs-lisp/byte-opt.el @ 66639:4408f56ebb87
(string-to-syntax): Mark it as pure.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 02 Nov 2005 19:03:17 +0000 |
parents | 5b1a238fcbb4 |
children | eb497460d73a |
comparison
equal
deleted
inserted
replaced
66638:4ac8c6441408 | 66639:4408f56ebb87 |
---|---|
1119 | 1119 |
1120 (put 'concat 'byte-optimizer 'byte-optimize-pure-func) | 1120 (put 'concat 'byte-optimizer 'byte-optimize-pure-func) |
1121 (put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func) | 1121 (put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func) |
1122 (put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func) | 1122 (put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func) |
1123 (put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func) | 1123 (put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func) |
1124 (put 'string-to-syntax 'byte-optimizer 'byte-optimize-pure-func) | |
1124 (defun byte-optimize-pure-func (form) | 1125 (defun byte-optimize-pure-func (form) |
1125 "Do constant folding for pure functions. | 1126 "Do constant folding for pure functions. |
1126 This assumes that the function will not have any side-effects and that | 1127 This assumes that the function will not have any side-effects and that |
1127 its return value depends solely on its arguments. | 1128 its return value depends solely on its arguments. |
1128 If the function can signal an error, this might change the semantics | 1129 If the function can signal an error, this might change the semantics |