diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/alloc.c b/src/alloc.c index 5e0b04b1cc7..6d6f6934bab 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3023,15 +3023,14 @@ 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 | 3026 | else if (NATIVE_COMP_FLAG |
| 3027 | else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_NATIVE_COMP_UNIT)) | 3027 | && PSEUDOVECTOR_TYPEP (&vector->header, PVEC_NATIVE_COMP_UNIT)) |
| 3028 | { | 3028 | { |
| 3029 | struct Lisp_Native_Comp_Unit *cu = | 3029 | struct Lisp_Native_Comp_Unit *cu = |
| 3030 | PSEUDOVEC_STRUCT (vector, Lisp_Native_Comp_Unit); | 3030 | PSEUDOVEC_STRUCT (vector, Lisp_Native_Comp_Unit); |
| 3031 | eassert (cu->handle); | 3031 | eassert (cu->handle); |
| 3032 | dynlib_close (cu->handle); | 3032 | dynlib_close (cu->handle); |
| 3033 | } | 3033 | } |
| 3034 | #endif | ||
| 3035 | } | 3034 | } |
| 3036 | 3035 | ||
| 3037 | /* Reclaim space used by unmarked vectors. */ | 3036 | /* Reclaim space used by unmarked vectors. */ |
| @@ -6565,14 +6564,12 @@ mark_object (Lisp_Object arg) | |||
| 6565 | break; | 6564 | break; |
| 6566 | 6565 | ||
| 6567 | case PVEC_SUBR: | 6566 | case PVEC_SUBR: |
| 6568 | #ifdef HAVE_NATIVE_COMP | ||
| 6569 | if (SUBRP_NATIVE_COMPILEDP (obj)) | 6567 | if (SUBRP_NATIVE_COMPILEDP (obj)) |
| 6570 | { | 6568 | { |
| 6571 | set_vector_marked (ptr); | 6569 | set_vector_marked (ptr); |
| 6572 | struct Lisp_Subr *subr = XSUBR (obj); | 6570 | struct Lisp_Subr *subr = XSUBR (obj); |
| 6573 | mark_object (subr->native_comp_u); | 6571 | mark_object (subr->native_comp_u[0]); |
| 6574 | } | 6572 | } |
| 6575 | #endif | ||
| 6576 | break; | 6573 | break; |
| 6577 | 6574 | ||
| 6578 | case PVEC_FREE: | 6575 | case PVEC_FREE: |
| @@ -6717,13 +6714,9 @@ survives_gc_p (Lisp_Object obj) | |||
| 6717 | break; | 6714 | break; |
| 6718 | 6715 | ||
| 6719 | case Lisp_Vectorlike: | 6716 | case Lisp_Vectorlike: |
| 6720 | #ifdef HAVE_NATIVE_COMP | ||
| 6721 | survives_p = | 6717 | survives_p = |
| 6722 | (SUBRP (obj) && !SUBRP_NATIVE_COMPILEDP (obj)) || | 6718 | (SUBRP (obj) && !SUBRP_NATIVE_COMPILEDP (obj)) || |
| 6723 | vector_marked_p (XVECTOR (obj)); | 6719 | vector_marked_p (XVECTOR (obj)); |
| 6724 | #else | ||
| 6725 | survives_p = SUBRP (obj) || vector_marked_p (XVECTOR (obj)); | ||
| 6726 | #endif | ||
| 6727 | break; | 6720 | break; |
| 6728 | 6721 | ||
| 6729 | case Lisp_Cons: | 6722 | case Lisp_Cons: |
| @@ -7473,14 +7466,14 @@ N should be nonnegative. */); | |||
| 7473 | static union Aligned_Lisp_Subr Swatch_gc_cons_threshold = | 7466 | static union Aligned_Lisp_Subr Swatch_gc_cons_threshold = |
| 7474 | {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, | 7467 | {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, |
| 7475 | { .a4 = watch_gc_cons_threshold }, | 7468 | { .a4 = watch_gc_cons_threshold }, |
| 7476 | 4, 4, "watch_gc_cons_threshold", {0}, {0}, 0}}; | 7469 | 4, 4, "watch_gc_cons_threshold", {0}, {0}}}; |
| 7477 | XSETSUBR (watcher, &Swatch_gc_cons_threshold.s); | 7470 | XSETSUBR (watcher, &Swatch_gc_cons_threshold.s); |
| 7478 | Fadd_variable_watcher (Qgc_cons_threshold, watcher); | 7471 | Fadd_variable_watcher (Qgc_cons_threshold, watcher); |
| 7479 | 7472 | ||
| 7480 | static union Aligned_Lisp_Subr Swatch_gc_cons_percentage = | 7473 | static union Aligned_Lisp_Subr Swatch_gc_cons_percentage = |
| 7481 | {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, | 7474 | {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, |
| 7482 | { .a4 = watch_gc_cons_percentage }, | 7475 | { .a4 = watch_gc_cons_percentage }, |
| 7483 | 4, 4, "watch_gc_cons_percentage", {0}, {0}, 0}}; | 7476 | 4, 4, "watch_gc_cons_percentage", {0}, {0}}}; |
| 7484 | XSETSUBR (watcher, &Swatch_gc_cons_percentage.s); | 7477 | XSETSUBR (watcher, &Swatch_gc_cons_percentage.s); |
| 7485 | Fadd_variable_watcher (Qgc_cons_percentage, watcher); | 7478 | Fadd_variable_watcher (Qgc_cons_percentage, watcher); |
| 7486 | } | 7479 | } |