mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 12:10:28 +02:00
use defsubst
(Best-ability ChangeLog annotation added by Christine Lemmer-Webber.) * module/language/elisp/boot.el (null, consp, listp, car, cdr): Update to use defsubst. (atom): New variable, using defsubst.
This commit is contained in:
parent
cfbf37d917
commit
dcb55d3895
1 changed files with 13 additions and 5 deletions
|
@ -71,15 +71,23 @@
|
|||
(%funcall (@ (language elisp runtime) eval-elisp) form)))
|
||||
|
||||
(eval-and-compile
|
||||
(defun null (object)
|
||||
(defsubst null (object)
|
||||
(declare (lexical object))
|
||||
(if object nil t))
|
||||
(defun consp (object)
|
||||
(%funcall (@ (guile) pair?) object))
|
||||
(defsubst consp (x)
|
||||
(declare (lexical x))
|
||||
(%funcall (@ (guile) pair?) x))
|
||||
(defsubst atom (x)
|
||||
(declare (lexical x))
|
||||
(null (consp x)))
|
||||
(defun listp (object)
|
||||
(declare (lexical object))
|
||||
(if object (consp object) t))
|
||||
(defun car (list)
|
||||
(defsubst car (list)
|
||||
(declare (lexical list))
|
||||
(if list (%funcall (@ (guile) car) list) nil))
|
||||
(defun cdr (list)
|
||||
(defsubst cdr (list)
|
||||
(declare (lexical list))
|
||||
(if list (%funcall (@ (guile) cdr) list) nil))
|
||||
(defun make-symbol (name)
|
||||
(%funcall (@ (guile) make-symbol) name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue