From b1b84927153006f4f444908d21f9f37d387b552d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Jul 2023 00:00:45 -0700 Subject: 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. --- stdlib/place.tl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'stdlib') 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 -- cgit v1.2.3