mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-23 04:53:12 -08:00
inline consp
This commit is contained in:
parent
4da353c6a3
commit
b3d858da8d
2 changed files with 24 additions and 1 deletions
16
src/comp.c
16
src/comp.c
|
|
@ -329,6 +329,12 @@ comp_TAGGEDP (gcc_jit_rvalue *obj, unsigned tag)
|
|||
return res;
|
||||
}
|
||||
|
||||
static gcc_jit_rvalue *
|
||||
comp_CONSP (gcc_jit_rvalue *obj)
|
||||
{
|
||||
return comp_TAGGEDP(obj, Lisp_Cons);
|
||||
}
|
||||
|
||||
static gcc_jit_rvalue *
|
||||
comp_FIXNUMP (gcc_jit_rvalue *obj)
|
||||
{
|
||||
|
|
@ -1004,7 +1010,15 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length,
|
|||
|
||||
CASE_CALL_NARGS (nth, 2);
|
||||
CASE_CALL_NARGS (symbolp, 1);
|
||||
CASE_CALL_NARGS (consp, 1);
|
||||
|
||||
case Bconsp:
|
||||
gcc_jit_block_add_assignment (
|
||||
comp.bblock->gcc_bb,
|
||||
NULL,
|
||||
TOS,
|
||||
comp_CONSP(gcc_jit_lvalue_as_rvalue (TOS)));
|
||||
break;
|
||||
|
||||
CASE_CALL_NARGS (stringp, 1);
|
||||
CASE_CALL_NARGS (listp, 1);
|
||||
CASE_CALL_NARGS (eq, 2);
|
||||
|
|
|
|||
|
|
@ -272,6 +272,15 @@
|
|||
(should (equal (comp-bubble-sort-f list1)
|
||||
(sort list2 #'<)))))
|
||||
|
||||
(ert-deftest comp-tests-list-inline ()
|
||||
"Test some inlined list functions."
|
||||
(defun comp-tests-consp-f (x)
|
||||
;; Bconsp
|
||||
(consp x))
|
||||
|
||||
(should (eq (comp-tests-consp-f '(1)) t))
|
||||
(should (eq (comp-tests-consp-f 1) nil)))
|
||||
|
||||
(ert-deftest comp-tests-gc ()
|
||||
"Try to do some longer computation to let the gc kick in."
|
||||
(dotimes (_ 100000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue