1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

some rework to please --enable-check-lisp-object-type

This commit is contained in:
Andrea Corallo 2019-12-27 17:02:23 +01:00
parent f4cb9cc903
commit 1c08dc8212
4 changed files with 6 additions and 6 deletions

View File

@ -866,7 +866,7 @@ 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))
if (NIL_IS_ZERO && EQ (obj, Qnil))
return emit_cast (comp.lisp_obj_type,
gcc_jit_context_new_rvalue_from_ptr (comp.ctxt,
comp.void_ptr_type,

View File

@ -919,7 +919,7 @@ Value, if non-nil, is a list (interactive SPEC). */)
if (SUBRP (fun))
{
if (SUBR_NATIVE_COMPILEDP (fun) && XSUBR (fun)->native_intspec)
if (SUBR_NATIVE_COMPILEDP (fun) && !NILP (XSUBR (fun)->native_intspec))
return XSUBR (fun)->native_intspec;
const char *spec = XSUBR (fun)->intspec;

View File

@ -4761,7 +4761,7 @@ extern char *emacs_root_dir (void);
INLINE bool
SUBR_NATIVE_COMPILEDP (Lisp_Object a)
{
return SUBRP (a) && XSUBR (a)->native_comp_u[0];
return SUBRP (a) && !NILP (XSUBR (a)->native_comp_u[0]);
}
INLINE struct Lisp_Native_Comp_Unit *

View File

@ -2948,13 +2948,13 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
struct Lisp_Subr out;
dump_object_start (ctx, &out, sizeof (out));
DUMP_FIELD_COPY (&out, subr, header.size);
if (NATIVE_COMP_FLAG && subr->native_comp_u[0])
if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0]))
out.function.a0 = NULL;
else
dump_field_emacs_ptr (ctx, &out, subr, &subr->function.a0);
DUMP_FIELD_COPY (&out, subr, min_args);
DUMP_FIELD_COPY (&out, subr, max_args);
if (NATIVE_COMP_FLAG && subr->native_comp_u[0])
if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0]))
{
dump_field_fixup_later (ctx, &out, subr, &subr->symbol_name);
dump_remember_cold_op (ctx,
@ -2973,7 +2973,7 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL);
dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out));
if (ctx->flags.dump_object_contents && subr->native_comp_u[0])
if (ctx->flags.dump_object_contents && !NILP (subr->native_comp_u[0]))
/* We'll do the final addr relocation during VERY_LATE_RELOCS time
after the compilation units has been loaded. */
dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS],