1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

remove `with-always-lexical' elisp special form

* module/language/elisp/compile-tree-il.scm: (always-lexical): Remove.
  All uses changed.
  (with-added-symbols): Remove.
  (compile-with-always-lexical): Remove.
  (process-options!): Remove support for the `#:always-lexical' option.
* module/language/elisp/runtime/function-slot.scm: Update import and
  re-export lists.
* test-suite/tests/elisp-compiler.test: Remove or update tests using
  `with-always-lexical'.
This commit is contained in:
BT Templeton 2011-07-10 17:07:42 -04:00
parent 03e00c5c9d
commit e5a361d1f9
3 changed files with 7 additions and 75 deletions

View file

@ -315,33 +315,11 @@
(= (funcall c1) 4)
(= (funcall c2) 3)))
(pass-if "always lexical option (all)"
(progn (setq a 0)
(defun dyna () a)
(let ((a 1))
(and (= a 1) (= (dyna) 0))))
#:opts '(#:always-lexical all))
(pass-if "always lexical option (list)"
(progn (setq a 0 b 0)
(defun dyna () a)
(defun dynb () b)
(let ((a 1)
(b 1))
(and (= a 1) (= (dyna) 0)
(= b 1) (= (dynb) 1))))
#:opts '(#:always-lexical (a)))
(pass-if "with-always-lexical"
(progn (setq a 0)
(defun dyna () a)
(with-always-lexical (a)
(let ((a 1))
(and (= a 1) (= (dyna) 0))))))
(pass-if "lexical lambda args"
(progn (setq a 1 b 1)
(defun dyna () a)
(defun dynb () b)
(with-always-lexical (a c)
(lexical-let (a c)
((lambda (a b &optional c)
(and (= a 3) (= (dyna) 1)
(= b 2) (= (dynb) 2)
@ -352,7 +330,7 @@
; is tail-optimized by doing a deep recursion that would otherwise overflow
; the stack.
(pass-if "lexical lambda tail-recursion"
(with-always-lexical (i)
(lexical-let (i)
(setq to 1000000)
(defun iteration-1 (i)
(if (< i to)