Mercurial > hg > xemacs-beta
comparison lisp/bytecomp.el @ 5579:3e621ba12d36
Don't byte-compile at macroexpansion time, load-time-vale.
lisp/ChangeLog addition:
2011-10-08 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-initial-macro-environment):
In the compiler implementation of load-time-value, don't
byte-compile at macroexpansion time, delay that until
byte-compilation time, giving, e.g. labels a chance to do its
thing.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 08 Oct 2011 12:01:20 +0100 |
parents | 0b6e7ae1e78f |
children | 4218b56833b3 |
comparison
equal
deleted
inserted
replaced
5578:4a6f90020a59 | 5579:3e621ba12d36 |
---|---|
498 . ,#'(lambda (&rest specs) | 498 . ,#'(lambda (&rest specs) |
499 (while specs | 499 (while specs |
500 (if (listp cl-declare-stack) (push (car specs) cl-declare-stack)) | 500 (if (listp cl-declare-stack) (push (car specs) cl-declare-stack)) |
501 (cl-do-proclaim (pop specs) nil)))) | 501 (cl-do-proclaim (pop specs) nil)))) |
502 (load-time-value | 502 (load-time-value |
503 . ,#'(lambda (form &optional read-only) | 503 . ,(symbol-macrolet ((wrapper '#:load-time-value)) |
504 (let* ((gensym (gensym)) | 504 (put wrapper 'byte-compile |
505 (byte-compile-bound-variables | 505 #'(lambda (form) |
506 (acons gensym byte-compile-global-bit | 506 (let* ((gensym (gensym)) |
507 byte-compile-bound-variables))) | 507 (byte-compile-bound-variables |
508 (setq byte-compile-output-preface | 508 (acons gensym byte-compile-global-bit |
509 (byte-compile-top-level | 509 byte-compile-bound-variables))) |
510 `(progn (setq ,gensym ,form) ,byte-compile-output-preface) | 510 (setq byte-compile-output-preface |
511 t 'file)) | 511 (byte-compile-top-level |
512 `(symbol-value ',gensym)))) | 512 `(progn |
513 (setq ,gensym (progn ,(second form))) | |
514 ,byte-compile-output-preface) | |
515 t 'file)) | |
516 (byte-compile-form `(symbol-value ',gensym) nil)))) | |
517 #'(lambda (form &optional read-only) | |
518 (list wrapper form)))) | |
513 (labels | 519 (labels |
514 . ,#'(lambda (bindings &rest body) | 520 . ,#'(lambda (bindings &rest body) |
515 (let* ((names (mapcar 'car bindings)) | 521 (let* ((names (mapcar 'car bindings)) |
516 (lambdas (mapcar | 522 (lambdas (mapcar |
517 (function* | 523 (function* |