1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 16:41:17 -08:00

Root for last_nonminibuffer_frame

This commit is contained in:
Gerd Möllmann 2024-04-19 14:59:12 +02:00
parent 9c1e11218e
commit d1e0545323
3 changed files with 26 additions and 0 deletions

View file

@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <c-ctype.h>
#include "lisp.h"
#include "igc.h"
#ifdef HAVE_WINDOW_SYSTEM
#include TERM_HEADER
@ -6257,6 +6258,9 @@ init_frame_once_for_pdumper (void)
{
PDUMPER_RESET_LV (Vframe_list, Qnil);
PDUMPER_RESET_LV (selected_frame, Qnil);
#ifdef HAVE_MPS
igc_root_create_exact_ptr (&last_nonminibuf_frame);
#endif
}
void

View file

@ -838,6 +838,19 @@ scan_exact (mps_ss_t ss, void *start, void *end, void *closure)
return MPS_RES_OK;
}
static mps_res_t
scan_ptr_exact (mps_ss_t ss, void *start, void *end, void *closure)
{
MPS_SCAN_BEGIN (ss)
{
for (void **p = start; (void *) p < end; ++p)
if (*p)
IGC_FIX12_RAW (ss, p);
}
MPS_SCAN_END (ss);
return MPS_RES_OK;
}
/***********************************************************************
Default pad, fwd, ...
***********************************************************************/
@ -1644,6 +1657,14 @@ igc_root_create_exact (Lisp_Object *start, Lisp_Object *end)
root_create_exact (global_igc, start, end, scan_exact);
}
void
igc_root_create_exact_ptr (void *var_addr)
{
void *start = var_addr;
void *end = (char *) start + sizeof (void *);
root_create_exact (global_igc, start, end, scan_ptr_exact);
}
static void
root_create_specpdl (struct igc_thread_list *t)
{

View file

@ -92,6 +92,7 @@ void igc_check_symbol (void *p);
void igc_collect (void);
void igc_root_create_ambig (void *start, void *end);
void igc_root_create_exact (Lisp_Object *start, Lisp_Object *end);
void igc_root_create_exact_ptr (void *var_addr);
# define eassert_not_mps() eassert (false)
#else