diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-12 00:53:30 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-12 00:53:30 -0500 |
commit | ce5b520a3758e22c6516e0d864d8c1a3512bf457 (patch) | |
tree | bcf74ea6c4f88995c5630113578632dc4ce2a878 /lisp/emacs-lisp/cconv.el | |
parent | c530e1c2a3a036d71942c354ba11b30a06341fd7 (diff) | |
download | emacs-ce5b520a3758e22c6516e0d864d8c1a3512bf457.tar.gz emacs-ce5b520a3758e22c6516e0d864d8c1a3512bf457.tar.bz2 emacs-ce5b520a3758e22c6516e0d864d8c1a3512bf457.zip |
* lisp/emacs-lisp/byte-lexbind.el: Delete.
* lisp/emacs-lisp/bytecomp.el (byte-compile-current-heap-environment)
(byte-compile-current-num-closures): Remove vars.
(byte-vec-ref, byte-vec-set): Remove byte codes.
(byte-compile-arglist-vars, byte-compile-make-lambda-lexenv): Move from
byte-lexbind.el.
(byte-compile-lambda): Never build a closure.
(byte-compile-closure-code-p, byte-compile-make-closure): Remove.
(byte-compile-closure): Simplify.
(byte-compile-top-level): Don't mess with heap environments.
(byte-compile-dynamic-variable-bind): Always maintain
byte-compile-bound-variables.
(byte-compile-variable-ref, byte-compile-variable-set): Always just use
the stack for lexical vars.
(byte-compile-push-binding-init): Simplify.
(byte-compile-not-lexical-var-p): New function, moved from cconv.el.
(byte-compile-bind, byte-compile-unbind): New functions, moved and
simplified from byte-lexbind.el.
(byte-compile-let, byte-compile-let*): Simplify.
(byte-compile-condition-case): Don't add :fun-body to the bound vars.
(byte-compile-defmacro): Simplify.
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops)
(byte-optimize-lapcode): Remove byte-vec-ref and byte-vec-set.
* lisp/emacs-lisp/cconv.el (cconv-not-lexical-var-p): Remove.
(cconv-freevars, cconv-analyse-function, cconv-analyse-form):
Use byte-compile-not-lexical-var-p instead.
* src/bytecode.c (Bvec_ref, Bvec_set): Remove.
(exec_byte_code): Don't handle them.
* lisp/help-fns.el (describe-function-1): Fix paren typo.
Diffstat (limited to 'lisp/emacs-lisp/cconv.el')
-rw-r--r-- | lisp/emacs-lisp/cconv.el | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index efb9d061b5c..10464047cd3 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -85,19 +85,6 @@ is less than this number.") "List of candidates for lambda lifting. Each candidate has the form (VAR INCLOSURE BINDER PARENTFORM).") -(defun cconv-not-lexical-var-p (var) - (or (not (symbolp var)) ; form is not a list - (if (eval-when-compile (fboundp 'special-variable-p)) - (special-variable-p var) - (boundp var)) - ;; byte-compile-bound-variables normally holds both the - ;; dynamic and lexical vars, but the bytecomp.el should - ;; only call us at the top-level so there shouldn't be - ;; any lexical vars in it here. - (memq var byte-compile-bound-variables) - (memq var '(nil t)) - (keywordp var))) - (defun cconv-freevars (form &optional fvrs) "Find all free variables of given form. Arguments: @@ -189,7 +176,7 @@ Returns a list of free variables." (dolist (exp body-forms) (setq fvrs (cconv-freevars exp fvrs))) fvrs) - (_ (if (cconv-not-lexical-var-p form) + (_ (if (byte-compile-not-lexical-var-p form) fvrs (cons form fvrs))))) @@ -704,7 +691,7 @@ Returns a form where all lambdas don't have any free variables." (defun cconv-analyse-function (args body env parentform inclosure) (dolist (arg args) (cond - ((cconv-not-lexical-var-p arg) + ((byte-compile-not-lexical-var-p arg) (byte-compile-report-error (format "Argument %S is not a lexical variable" arg))) ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ... @@ -738,7 +725,7 @@ lambdas if they are suitable for lambda lifting. (cconv-analyse-form value (if (eq letsym 'let*) env orig-env) inclosure)) - (unless (cconv-not-lexical-var-p var) + (unless (byte-compile-not-lexical-var-p var) (let ((varstruct (list var inclosure binder form))) (push varstruct env) ; Push a new one. |