summaryrefslogtreecommitdiff
path: root/module/language/elisp/compile-tree-il.scm
diff options
context:
space:
mode:
authorBT Templeton <bpt@hcoop.net>2011-08-08 20:20:16 -0400
committerBT Templeton <bpt@hcoop.net>2012-02-03 18:53:50 -0500
commit9083c48d37e89f45a155be7fdec2029a54259fbd (patch)
treeb127fb573170179c70ce1cc90dbe612a4bde89d4 /module/language/elisp/compile-tree-il.scm
parent13f022c9f78b5a5e8e59b2afde8a8f21f7bb5e78 (diff)
downloadguile-9083c48d37e89f45a155be7fdec2029a54259fbd.tar.gz
lexical binding macros
* module/language/elisp/boot.el (lexical-let, lexical-let*): New macros. * module/language/elisp/compile-tree-il.scm (bind-lexically?): Remove the check for a `lexical' flag, since `lexical-let' and `lexical-let*' are no longer special operators. (compile-lexical-let, compile-lexical-let*): Remove. * module/language/elisp/runtime/function-slot.scm: Update module definition.
Diffstat (limited to 'module/language/elisp/compile-tree-il.scm')
-rw-r--r--module/language/elisp/compile-tree-il.scm25
1 files changed, 1 insertions, 24 deletions
diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm
index fb8189bfc..ae950bf12 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -37,11 +37,9 @@
compile-defvar
compile-setq
compile-let
- compile-lexical-let
compile-flet
compile-labels
compile-let*
- compile-lexical-let*
compile-guile-ref
compile-guile-primitive
compile-function
@@ -205,8 +203,7 @@
value))))
(define (bind-lexically? sym module decls)
- (or (eq? module 'lexical)
- (eq? module function-slot)
+ (or (eq? module function-slot)
(let ((decl (assq-ref decls sym)))
(and (equal? module value-slot)
(or
@@ -273,10 +270,6 @@
;;; Compile let and let* expressions. The code here is used both for
;;; let/let* and flet, just with a different bindings module.
-;;;
-;;; A special module value 'lexical means that we're doing a lexical-let
-;;; instead and the bindings should not be saved to globals at all but
-;;; be done with the lexical framework instead.
;;; Let is done with a single call to let-dynamic binding them locally
;;; to new values all "at once". If there is at least one variable to
@@ -621,14 +614,6 @@
(map (cut parse-let-binding loc <>) bindings)
body))))
-(defspecial lexical-let (loc args)
- (pmatch args
- ((,bindings . ,body)
- (generate-let loc
- 'lexical
- (map (cut parse-let-binding loc <>) bindings)
- body))))
-
(defspecial flet (loc args)
(pmatch args
((,bindings . ,body)
@@ -665,14 +650,6 @@
(map (cut parse-let-binding loc <>) bindings)
body))))
-(defspecial lexical-let* (loc args)
- (pmatch args
- ((,bindings . ,body)
- (generate-let* loc
- 'lexical
- (map (cut parse-let-binding loc <>) bindings)
- body))))
-
;;; guile-ref allows building TreeIL's module references from within
;;; elisp as a way to access data within the Guile universe. The module
;;; and symbol referenced are static values, just like (@ module symbol)