[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc d9830156fb9 05/78: WIP
From: |
Gerd Moellmann |
Subject: |
scratch/igc d9830156fb9 05/78: WIP |
Date: |
Fri, 14 Jun 2024 04:27:10 -0400 (EDT) |
branch: scratch/igc
commit d9830156fb99045281c81ae5e1acb4755f195259
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
WIP
---
src/igc.c | 49 ++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 42 insertions(+), 7 deletions(-)
diff --git a/src/igc.c b/src/igc.c
index f7bd5345784..8a867c8b901 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -3926,9 +3926,15 @@ mirror_ptr_vec (struct igc_mirror *m, void *client)
}
static void
-mirror_obj_vec (struct igc_mirror *m, void *client)
+mirror_obj_vec (struct igc_mirror *m, Lisp_Object *v)
{
- NOT_IMPLEMENTED ();
+ struct igc_header *h = client_to_base (v);
+ igc_assert (sizeof (struct igc_header) % sizeof (Lisp_Object) == 0);
+ /* The below should yield 'h->nwords - 1' for 64-bit builds, and
+ 'h->nwords - 2' for 32-bit. */
+ size_t imax = h->nwords - to_words (sizeof (struct igc_header));
+ for (size_t i = 0; i < imax; ++i)
+ IGC_MIRROR_OBJ (m, &v[i]);
}
static void
@@ -3985,7 +3991,25 @@ mirror_obarray (struct igc_mirror *m, struct
Lisp_Obarray *o)
static void
mirror_font (struct igc_mirror *m, struct Lisp_Vector *v)
{
- NOT_IMPLEMENTED ();
+ mirror_vectorlike (m, v);
+ /* See font.h for the magic numbers. */
+ switch (v->header.size & PSEUDOVECTOR_SIZE_MASK)
+ {
+ case FONT_SPEC_MAX:
+ case FONT_ENTITY_MAX:
+ break;
+
+ case FONT_OBJECT_MAX:
+ {
+ struct font *f = (struct font *) v;
+ Lisp_Object const *type = &f->driver->type;
+ IGC_MIRROR_OBJ (m, (Lisp_Object *) type);
+ }
+ break;
+
+ default:
+ emacs_abort ();
+ }
}
static void
@@ -4088,19 +4112,29 @@ mirror_window (struct igc_mirror *m, struct window *w)
static void
mirror_hash_table (struct igc_mirror *m, struct Lisp_Hash_Table *h)
{
- NOT_IMPLEMENTED ();
+ IGC_MIRROR_RAW (m, &h->key);
+ IGC_MIRROR_RAW (m, &h->value);
+ IGC_MIRROR_RAW (m, &h->hash);
+ IGC_MIRROR_RAW (m, &h->next);
+ IGC_MIRROR_RAW (m, &h->index);
}
static void
mirror_char_table (struct igc_mirror *m, struct Lisp_Vector *v)
{
- NOT_IMPLEMENTED ();
+ int size = v->header.size & PSEUDOVECTOR_SIZE_MASK;
+ enum pvec_type type = pseudo_vector_type (v);
+ int idx = type == PVEC_SUB_CHAR_TABLE ? SUB_CHAR_TABLE_OFFSET : 0;
+ for (int i = idx; i < size; ++i)
+ IGC_MIRROR_OBJ (m, &v->contents[i]);
}
static void
mirror_overlay (struct igc_mirror *m, struct Lisp_Overlay *o)
{
- NOT_IMPLEMENTED ();
+ IGC_MIRROR_RAW (m, &o->buffer);
+ IGC_MIRROR_OBJ (m, &o->plist);
+ IGC_MIRROR_RAW (m, &o->interval);
}
static void
@@ -4136,7 +4170,8 @@ mirror_terminal (struct igc_mirror *m, struct terminal *t)
static void
mirror_marker (struct igc_mirror *m, struct Lisp_Marker *ma)
{
- NOT_IMPLEMENTED ();
+ IGC_MIRROR_RAW (m, &ma->buffer);
+ IGC_MIRROR_RAW (m, &ma->next);
}
static void
- scratch/igc updated (2e49bbf1816 -> c19fa49ca4e), Gerd Moellmann, 2024/06/14
- scratch/igc c77cf64d7cd 02/78: Revert "Remove copying/mirroring code", Gerd Moellmann, 2024/06/14
- scratch/igc 790e99b2b83 03/78: Make it build again, Gerd Moellmann, 2024/06/14
- scratch/igc 8abca66ede4 12/78: Refactoring, Gerd Moellmann, 2024/06/14
- scratch/igc 0f42efc428a 16/78: Refactoring, Gerd Moellmann, 2024/06/14
- scratch/igc 219f7d5ce20 01/78: emacs_lldb.py: reflect PVEC changes, Gerd Moellmann, 2024/06/14
- scratch/igc a09e5827a06 04/78: WIP, Gerd Moellmann, 2024/06/14
- scratch/igc d9830156fb9 05/78: WIP,
Gerd Moellmann <=
- scratch/igc 931dc7c27cf 10/78: WIP, Gerd Moellmann, 2024/06/14
- scratch/igc c9b85c4516a 13/78: More refactoring, Gerd Moellmann, 2024/06/14
- scratch/igc 399e0776507 17/78: igc_const_cast, Gerd Moellmann, 2024/06/14
- scratch/igc 19df715fe2c 23/78: Refactoring, Gerd Moellmann, 2024/06/14
- scratch/igc 536bec0f0ae 35/78: WIP, Gerd Moellmann, 2024/06/14
- scratch/igc b6f508613a7 37/78: +hash_table_rehash, Gerd Moellmann, 2024/06/14
- scratch/igc 4049bfa0d09 41/78: Refactor a bit, Gerd Moellmann, 2024/06/14
- scratch/igc 41ff9072503 47/78: Replace igc_create_charset_root (not executed if dump is loaded), Gerd Moellmann, 2024/06/14
- scratch/igc a4000e8a81d 14/78: WIP, Gerd Moellmann, 2024/06/14
- scratch/igc 5754633ebce 15/78: WIP, Gerd Moellmann, 2024/06/14