From: Andrea Corallo Date: Thu, 15 Aug 2019 16:49:36 +0000 (+0200) Subject: inline car cdr X-Git-Tag: emacs-28.0.90~2727^2~1283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92fc5baf17ccd0999f631d469708523de50ac06e;p=emacs.git inline car cdr --- diff --git a/src/comp.c b/src/comp.c index fed777e9e0b..dd43ed40344 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1409,6 +1409,26 @@ emit_consp (Lisp_Object insn) 1, &res); } +static gcc_jit_rvalue * +emit_car (Lisp_Object insn) +{ + gcc_jit_rvalue *x = emit_mvar_val (SECOND (insn)); + return gcc_jit_context_new_call (comp.ctxt, + NULL, + comp.car, + 1, &x); +} + +static gcc_jit_rvalue * +emit_cdr (Lisp_Object insn) +{ + gcc_jit_rvalue *x = emit_mvar_val (SECOND (insn)); + return gcc_jit_context_new_call (comp.ctxt, + NULL, + comp.cdr, + 1, &x); +} + /****************************************************************/ /* Inline function definition and lisp data structure follows. */ @@ -2219,6 +2239,8 @@ DEFUN ("comp-init-ctxt", Fcomp_init_ctxt, Scomp_init_ctxt, register_emitter (QFadd1, emit_add1); register_emitter (QFsub1, emit_sub1); register_emitter (QFconsp, emit_consp); + register_emitter (QFcar, emit_car); + register_emitter (QFcdr, emit_cdr); } comp.ctxt = gcc_jit_context_acquire(); @@ -2622,6 +2644,8 @@ syms_of_comp (void) DEFSYM (QFadd1, "Fadd1"); DEFSYM (QFsub1, "Fsub1"); DEFSYM (QFconsp, "Fconsp"); + DEFSYM (QFcar, "Fcar"); + DEFSYM (QFcdr, "Fcdr"); defsubr (&Scomp_init_ctxt); defsubr (&Scomp_release_ctxt);