summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-07-17 00:00:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-07-17 00:00:45 -0700
commitb1b84927153006f4f444908d21f9f37d387b552d (patch)
tree106e1c3f813479c794b8fb6b1f333dda65cb5e71 /stdlib
parent858aa11f2dbd5db5245bd3a0b1aa5fe9d91c7f65 (diff)
downloadtxr-b1b84927153006f4f444908d21f9f37d387b552d.tar.gz
txr-b1b84927153006f4f444908d21f9f37d387b552d.tar.bz2
txr-b1b84927153006f4f444908d21f9f37d387b552d.zip
Simplify top-level macro environments also.
Like was done with the function and variable top-level environments, we simplify the macro ones. * eval.c (func_get_name, lookup_mac, lookup_symac, lookup_symac_lisp1, op_defsymacro, rt_defsymacro, rt_defmacro, op_defmacro, reg_mac, reg_symacro): Adjust to simpler representation where the hash cell itself is the binding cell, rather than holding a binding cell in its cdr.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/place.tl5
1 files changed, 2 insertions, 3 deletions
diff --git a/stdlib/place.tl b/stdlib/place.tl
index f1bef38a..b7437de2 100644
--- a/stdlib/place.tl
+++ b/stdlib/place.tl
@@ -813,8 +813,7 @@
:))
((type sym)
(if (eq type 'macro)
- (let ((cell (or (gethash sys:top-mb sym)
- (sethash sys:top-mb sym (cons sym nil)))))
+ (let ((cell (or (inhash sys:top-mb sym nil))))
(cons (op cdr)
(op sys:rplacd cell)))
:))
@@ -840,7 +839,7 @@
,body)))
(defun sys:get-mb (f sym)
- (or (gethash sys:top-mb sym)
+ (or (inhash sys:top-mb sym)
(compile-error f "unbound macro ~s" sym)))
(defplace (symbol-macro sym-expr) body