* src/pdumper.c (dump_do_dump_relocation): While fixing up lambda
relocation verify placeholder coherency.
* src/comp.c (syms_of_comp): Define symbol 'lambda-fixup'.
* lisp/emacs-lisp/comp.el (comp-finalize-container): Leave a
lambda-fixup as placeholder in the relocation as a sanity check.
;; from the corresponding m-var.
collect (if (gethash obj
(comp-ctxt-byte-func-to-func-h comp-ctxt))
- nil
+ 'lambda-fixup
obj))))
(defun comp-finalize-relocs ()
DEFSYM (Qfixnum, "fixnum");
DEFSYM (Qscratch, "scratch");
DEFSYM (Qlate, "late");
+ DEFSYM (Qlambda_fixup, "lambda-fixup");
/* To be signaled by the compiler. */
DEFSYM (Qnative_compiler_error, "native-compiler-error");
if (!NILP (lambda_data_idx))
{
/* This is an anonymous lambda.
- We must fixup data_vec so the lambda can be referenced
+ We must fixup d_reloc_imp so the lambda can be referenced
by code. */
Lisp_Object tem;
XSETSUBR (tem, subr);
- comp_u->data_imp_relocs[XFIXNUM (lambda_data_idx)] = tem;
+ Lisp_Object *fixup =
+ &(comp_u->data_imp_relocs[XFIXNUM (lambda_data_idx)]);
+ eassert (EQ (*fixup, Qlambda_fixup));
+ *fixup = tem;
Fputhash (tem, Qnil, comp_u->lambda_gc_guard);
}
break;