[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/comp-static-data 83c49e2f376 01/16: Avoid additional recursion w
|
From: |
Vibhav Pant |
|
Subject: |
scratch/comp-static-data 83c49e2f376 01/16: Avoid additional recursion while marking natively compiled unit. |
|
Date: |
Thu, 19 Jan 2023 12:44:32 -0500 (EST) |
branch: scratch/comp-static-data
commit 83c49e2f376c070e7448773e7add55b3a1e4a37e
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>
Avoid additional recursion while marking natively compiled unit.
* src/alloc.c (mark_native_comp_unit): Push psuedovector fields on the
mark stack only, avoiding additional recursion.
---
src/alloc.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 0a4323d1ceb..40f4402bca4 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6821,9 +6821,16 @@ 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_stack_push_values (Lisp_Object *values, ptrdiff_t n);
+
+static void
+mark_native_comp_unit (struct Lisp_Vector *ptr)
{
- mark_vectorlike (&comp_u->header);
+ struct Lisp_Native_Comp_Unit *comp_u
+ = (struct Lisp_Native_Comp_Unit *) ptr;
+ ptrdiff_t size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK;
+ set_vector_marked (ptr);
+ mark_stack_push_values (ptr->contents, size);
#ifdef HAVE_STATIC_LISP_GLOBALS
if (comp_u->have_static_lisp_data)
@@ -6836,13 +6843,13 @@ mark_native_comp_unit (struct Lisp_Native_Comp_Unit
*comp_u)
Lisp_Object u_staticvec = comp_u->staticpro;
if (!NILP (u_staticvec))
- mark_objects (XVECTOR (u_staticvec)->contents,
- ASIZE (u_staticvec));
+ mark_stack_push_values (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));
+ mark_stack_push_values (XVECTOR (u_ephemeral)->contents,
+ ASIZE (u_ephemeral));
}
#endif
}
@@ -7288,7 +7295,7 @@ process_mark_stack (ptrdiff_t base_sp)
break;
case PVEC_NATIVE_COMP_UNIT:
- mark_native_comp_unit (XNATIVE_COMP_UNIT (obj));
+ mark_native_comp_unit (ptr);
break;
case PVEC_FREE:
- scratch/comp-static-data updated (e7459fcbde4 -> b67b328d6ab), Vibhav Pant, 2023/01/19
- scratch/comp-static-data 0246e122df8 04/16: Avoid accessing Lisp_Vector's size field directly., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 80ea23618da 06/16: Avoid directly accessing the size field in a Lisp String., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 7727f85b869 07/16: src/.gdbinit: Add pretty-printing support for native comp units., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 83c49e2f376 01/16: Avoid additional recursion while marking natively compiled unit.,
Vibhav Pant <=
- scratch/comp-static-data ab886f48966 05/16: comp.c: Only call comp_init_objs when not recursively loading., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 4a0854c9e32 03/16: src/alloc.c: Unmark Lisp Vectors when accessing the size field., Vibhav Pant, 2023/01/19
- scratch/comp-static-data a0bd3b7d32a 02/16: src/alloc.c: Remove unnecessary calls to static_comp_object_p., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 6bf897449b6 09/16: src/comp.c: Disable native compiling certain bytecode forms for now., Vibhav Pant, 2023/01/19
- scratch/comp-static-data fb3a68c171e 12/16: ; src/comp.c: Fix typo in call to comp-func-byte-func., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 99896f21267 10/16: Merge branch 'master' into scratch/comp-static-data, Vibhav Pant, 2023/01/19
- scratch/comp-static-data 87909765da7 13/16: comp.el: Avoid unnecessary allocation of byte-code forms., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 485f868bbfe 14/16: src/alloc.c: Improve checks in static_comp_object_p., Vibhav Pant, 2023/01/19
- scratch/comp-static-data b67b328d6ab 16/16: Pin native comp units with static objects for now., Vibhav Pant, 2023/01/19
- scratch/comp-static-data 2cc0d51f29d 11/16: src/comp.c: Address several GC-related issues with static literals., Vibhav Pant, 2023/01/19