[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/comp-static-data a6f3188ba1 6/9: Separate marking native comp un
From: |
Vibhav Pant |
Subject: |
scratch/comp-static-data a6f3188ba1 6/9: Separate marking native comp units into their own function. |
Date: |
Tue, 20 Dec 2022 11:29:41 -0500 (EST) |
branch: scratch/comp-static-data
commit a6f3188ba18bd88eeed613a02d7a6f0204263d9d
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>
Separate marking native comp units into their own function.
* src/alloc.c (mark_native_comp_unit): New function.
(process_mark_stack): Use it.
---
src/alloc.c | 60 ++++++++++++++++++++++++++++--------------------------------
1 file changed, 28 insertions(+), 32 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 3a2ff64b19..0a8c182661 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6575,6 +6575,33 @@ mark_char_table (struct Lisp_Vector *ptr, enum pvec_type
pvectype)
}
}
+static void
+mark_native_comp_unit (struct Lisp_Native_Comp_Unit *comp_u)
+{
+ mark_vectorlike (&comp_u->header);
+
+#ifdef HAVE_STATIC_LISP_GLOBALS
+ if (comp_u->have_static_lisp_data)
+ {
+ eassert (NILP (comp_u->lambda_gc_guard_h));
+ eassert (NILP (comp_u->lambda_c_name_idx_h));
+ eassert (NILP (comp_u->data_vec));
+ eassert (NILP (comp_u->data_impure_vec));
+ eassert (comp_u->data_imp_relocs == NULL);
+
+ Lisp_Object u_staticvec = comp_u->staticpro;
+ if (!NILP (u_staticvec))
+ mark_objects (XVECTOR (u_staticvec)->contents,
+ ASIZE (u_staticvec));
+
+ Lisp_Object u_ephemeral = comp_u->ephemeral;
+ if (!NILP (u_ephemeral))
+ mark_objects (XVECTOR (u_ephemeral)->contents,
+ ASIZE (u_ephemeral));
+ }
+#endif
+}
+
/* Mark the chain of overlays starting at PTR. */
static void
@@ -7015,40 +7042,9 @@ process_mark_stack (ptrdiff_t base_sp)
#endif
break;
-#ifdef HAVE_STATIC_LISP_GLOBALS
case PVEC_NATIVE_COMP_UNIT:
- {
- ptrdiff_t size = ptr->header.size;
- eassert (size & PSEUDOVECTOR_FLAG);
- set_vector_marked (ptr);
- mark_stack_push_values (ptr->contents,
- size
- & PSEUDOVECTOR_SIZE_MASK);
- struct Lisp_Native_Comp_Unit *comp_u
- = XNATIVE_COMP_UNIT (obj);
- if (comp_u->have_static_lisp_data)
- {
- eassert (NILP (comp_u->lambda_gc_guard_h)
- && NILP (comp_u->lambda_c_name_idx_h)
- && NILP (comp_u->data_vec)
- && NILP (comp_u->data_impure_vec)
- && comp_u->data_imp_relocs == NULL);
-
- Lisp_Object staticpro = comp_u->staticpro;
- if (!NILP (staticpro))
- mark_stack_push_values
- (XVECTOR (staticpro)->contents,
- ASIZE (staticpro));
-
- Lisp_Object ephemeral = comp_u->ephemeral;
- if (!NILP (ephemeral))
- mark_stack_push_values
- (XVECTOR (ephemeral)->contents,
- ASIZE (ephemeral));
- }
- }
+ mark_native_comp_unit (XNATIVE_COMP_UNIT (obj));
break;
-#endif
case PVEC_FREE:
emacs_abort ();
- scratch/comp-static-data updated (f61a9ee8e4 -> e7459fcbde), Vibhav Pant, 2022/12/20
- scratch/comp-static-data 4385d8e590 4/9: comp: Use the correct integer types and values for storing mark bits, Vibhav Pant, 2022/12/20
- scratch/comp-static-data 0f3bcbba83 1/9: src/alloc.c: Don't mark a symbol's name if it's already marked., Vibhav Pant, 2022/12/20
- scratch/comp-static-data 89892db0af 8/9: src/comp.h: Check for GC_CHECK_MARKED_OBJECTS correctly., Vibhav Pant, 2022/12/20
- scratch/comp-static-data a6f3188ba1 6/9: Separate marking native comp units into their own function.,
Vibhav Pant <=
- scratch/comp-static-data bcc739d73d 5/9: Statically emit self evaluating bytecode vectors during native comp., Vibhav Pant, 2022/12/20
- scratch/comp-static-data 0f63d334b9 3/9: Improve how static Lisp strings are generated., Vibhav Pant, 2022/12/20
- scratch/comp-static-data ec88bbd1bf 7/9: Correctly build builtin syms string while hashing abi., Vibhav Pant, 2022/12/20
- scratch/comp-static-data 722b58bf9d 2/9: Add static_comp_object_p for working with statically emmited objects, Vibhav Pant, 2022/12/20
- scratch/comp-static-data e7459fcbde 9/9: Merge branch 'master' into scratch/comp-static-data, Vibhav Pant, 2022/12/20