From 84caa1a404cb89a6f02aa1cb517f5251e7e0e022 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 22 Sep 2019 19:13:32 +0200 Subject: [PATCH] optimize nil emission --- src/comp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/comp.c b/src/comp.c index 6daeae311c3..afc7a3b1873 100644 --- a/src/comp.c +++ b/src/comp.c @@ -803,6 +803,12 @@ emit_const_lisp_obj (Lisp_Object obj) emit_comment (format_string ("const lisp obj: %s", SSDATA (Fprin1_to_string (obj, Qnil)))); + if (Qnil == NULL && EQ (obj, Qnil)) + return emit_cast (comp.lisp_obj_type, + gcc_jit_context_new_rvalue_from_ptr (comp.ctxt, + comp.void_ptr_type, + NULL)); + Lisp_Object d_reloc_idx = FUNCALL1 (comp-ctxt-data-relocs-idx, Vcomp_ctxt); ptrdiff_t reloc_fixn = XFIXNUM (Fgethash (obj, d_reloc_idx, Qnil)); gcc_jit_rvalue *reloc_n = -- 2.39.5