]> git.eshelyaron.com Git - emacs.git/commitdiff
fix consp
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 16 Jun 2019 09:59:11 +0000 (11:59 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:42 +0000 (11:33 +0100)
src/comp.c
test/src/comp-tests.el

index f3fd8dc16bbf1a3de2ece32ba5e01ddd57cba99a..7bdf1a8615c6aad172a70438f75d4ea08b5e773a 100644 (file)
@@ -495,13 +495,13 @@ emit_TAGGEDP (gcc_jit_rvalue *obj, unsigned tag)
 static gcc_jit_rvalue *
 emit_VECTORLIKEP (gcc_jit_rvalue *obj)
 {
-  return emit_TAGGEDP(obj, Lisp_Vectorlike);
+  return emit_TAGGEDP (obj, Lisp_Vectorlike);
 }
 
 static gcc_jit_rvalue *
 emit_CONSP (gcc_jit_rvalue *obj)
 {
-  return emit_TAGGEDP(obj, Lisp_Cons);
+  return emit_TAGGEDP (obj, Lisp_Cons);
 }
 
 static gcc_jit_rvalue *
@@ -1332,11 +1332,14 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length,
        CASE_CALL_NARGS (symbolp, 1);
 
        case Bconsp:
-         gcc_jit_block_add_assignment (
-           comp.bblock->gcc_bb,
-           NULL,
-           TOS,
-           emit_CONSP(gcc_jit_lvalue_as_rvalue (TOS)));
+         POP1;
+         res = emit_cast (comp.bool_type,
+                          emit_CONSP (args[0]));
+         res = gcc_jit_context_new_call (comp.ctxt,
+                                         NULL,
+                                         comp.bool_to_lisp_obj,
+                                         1, &res);
+         PUSH_RVAL (res);
          break;
 
        CASE_CALL_NARGS (stringp, 1);
index d7e6954455bd74590ce83267a2e2dfa673c37d61..99dce77dc295bec0a4bdba9e71a88cda855b084f 100644 (file)
     ;; Bconsp
     (consp x))
 
-  ;; (byte-compile #'comp-tests-consp-f)
-  ;; (native-compile #'comp-tests-consp-f)
+  (byte-compile #'comp-tests-consp-f)
+  (native-compile #'comp-tests-consp-f)
 
   (should (eq (comp-tests-consp-f '(1)) t))
   (should (eq (comp-tests-consp-f 1) nil)))