aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorAndrea Corallo2019-12-20 05:22:09 +0100
committerAndrea Corallo2020-01-01 11:38:13 +0100
commit4496a3f5ba899c89e45cd478a22b25ddf77869ec (patch)
treefdc43a9698554a5a218104e762e80e43428c07dc /src/alloc.c
parentb3cbdfc86474932e4ef8d1237ed100a6f4f4c854 (diff)
downloademacs-4496a3f5ba899c89e45cd478a22b25ddf77869ec.tar.gz
emacs-4496a3f5ba899c89e45cd478a22b25ddf77869ec.zip
initial compilation unit as object add
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 5ff0d907915..d990f53f7a0 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3023,6 +3023,15 @@ cleanup_vector (struct Lisp_Vector *vector)
3023 if (uptr->finalizer) 3023 if (uptr->finalizer)
3024 uptr->finalizer (uptr->p); 3024 uptr->finalizer (uptr->p);
3025 } 3025 }
3026#ifdef HAVE_NATIVE_COMP
3027 else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_NATIVE_COMP_UNIT))
3028 {
3029 struct Lisp_Native_Compilation_Unit *cu =
3030 PSEUDOVEC_STRUCT (vector, Lisp_Native_Compilation_Unit);
3031 eassert (cu->handle);
3032 dynlib_close (cu->handle);
3033 }
3034#endif
3026} 3035}
3027 3036
3028/* Reclaim space used by unmarked vectors. */ 3037/* Reclaim space used by unmarked vectors. */
@@ -6556,6 +6565,10 @@ mark_object (Lisp_Object arg)
6556 break; 6565 break;
6557 6566
6558 case PVEC_SUBR: 6567 case PVEC_SUBR:
6568#ifdef HAVE_NATIVE_COMP
6569 if (XSUBR (obj)->native_comp_u)
6570 set_vector_marked (ptr);
6571#endif
6559 break; 6572 break;
6560 6573
6561 case PVEC_FREE: 6574 case PVEC_FREE:
@@ -6700,7 +6713,13 @@ survives_gc_p (Lisp_Object obj)
6700 break; 6713 break;
6701 6714
6702 case Lisp_Vectorlike: 6715 case Lisp_Vectorlike:
6716#ifdef HAVE_NATIVE_COMP
6717 survives_p =
6718 (SUBRP (obj) && !XSUBR (obj)->native_comp_u) ||
6719 vector_marked_p (XVECTOR (obj));
6720#else
6703 survives_p = SUBRP (obj) || vector_marked_p (XVECTOR (obj)); 6721 survives_p = SUBRP (obj) || vector_marked_p (XVECTOR (obj));
6722#endif
6704 break; 6723 break;
6705 6724
6706 case Lisp_Cons: 6725 case Lisp_Cons: