[PATCH] remove duplicated hashtable functions from "BOOTTRAN"

2 views
Skip to first unread message

Qian Yun

unread,
May 22, 2026, 8:37:16 AM (5 days ago) May 22
to fricas-devel
Remove duplicated hashtable functions from "BOOTTRAN",
use existing ones from package "BOOT".

- Qian
remove-duplicated-hashtable-functions.patch

Waldek Hebisch

unread,
May 22, 2026, 8:43:44 AM (5 days ago) May 22
to fricas...@googlegroups.com
On Fri, May 22, 2026 at 08:37:11PM +0800, Qian Yun wrote:
> Remove duplicated hashtable functions from "BOOTTRAN",
> use existing ones from package "BOOT".

Thanks, please commit.

> diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp
> index a1d5d49d..e5a7ad89 100644
> --- a/src/boot/initial-env.lisp
> +++ b/src/boot/initial-env.lisp
> @@ -102,18 +102,6 @@
> (if length (subseq cvec start (+ start length))
> (subseq cvec start)))
>
> -(defun HKEYS (table)
> - (let (keys)
> - (maphash #'(lambda (key val)
> - (declare (ignore val))
> - (push key keys)) table)
> - keys))
> -
> -
> -(defun HPUT (table key value)
> - (setf (gethash key table) value))
> -
> -
> (defun stringimage (x)
> (write-to-string x))
>
> diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
> index 49cf8f4b..e73d748c 100644
> --- a/src/interp/vmlisp.lisp
> +++ b/src/interp/vmlisp.lisp
> @@ -499,12 +499,6 @@
>
> ;17.2 Accessing
>
> -(defun HKEYS (table)
> - (let (keys)
> - (maphash
> - #'(lambda (key val) (declare (ignore val)) (push key keys)) table)
> - keys))
> -
> (define-function 'HASHTABLE_CLASS #'hash-table-test)
>
> (define-function 'HCOUNT #'hash-table-count)
> diff --git a/src/lisp/fricas-package.lisp b/src/lisp/fricas-package.lisp
> index 132a9ac7..dcab567d 100644
> --- a/src/lisp/fricas-package.lisp
> +++ b/src/lisp/fricas-package.lisp
> @@ -86,7 +86,7 @@
> (in-package "BOOTTRAN")
>
> (import '(BOOT::MAKE_HASHTABLE BOOT::QSETVELT BOOT::SETELT_BVEC
> - BOOT::STR_ELT))
> + BOOT::STR_ELT BOOT::HPUT BOOT::HKEYS))
>
> ;;; Package containing support routines for code generated
> ;;; by Aldor compiler.
> diff --git a/src/lisp/primitives.lisp b/src/lisp/primitives.lisp
> index c88c5852..9144de6c 100644
> --- a/src/lisp/primitives.lisp
> +++ b/src/lisp/primitives.lisp
> @@ -597,6 +597,12 @@
> (t (error "bad arg to MAKE_HASHTABLE")))
> )
>
> +(defun HKEYS (table)
> + (let (keys)
> + (maphash
> + #'(lambda (key val) (declare (ignore val)) (push key keys)) table)
> + keys))
> +
> ; Misc operations
>
> (defmacro |qset_first|(l x) `(SETF (CAR (the cons ,l)) ,x))


--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages