[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] nick.lloyd-bytecode-jit fcc76c6 7/9: Free JIT contexts whe
From: |
Nickolas Lloyd |
Subject: |
[Emacs-diffs] nick.lloyd-bytecode-jit fcc76c6 7/9: Free JIT contexts when compiled functions cleaned up |
Date: |
Sun, 29 Jan 2017 16:30:46 +0000 (UTC) |
branch: nick.lloyd-bytecode-jit
commit fcc76c6d04ce212d579620fcac9c166a0ff141b5
Author: Nickolas Lloyd <address@hidden>
Commit: Nickolas Lloyd <address@hidden>
Free JIT contexts when compiled functions cleaned up
* src/alloc.c (cleanup_vector): Call jit_context_destroy () to destroy a
compiled function's associated context when it's pseudovector is destroyed.
---
src/alloc.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/alloc.c b/src/alloc.c
index 100cefe..585be22 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -30,6 +30,10 @@ along with GNU Emacs. If not, see
<http://www.gnu.org/licenses/>. */
#include <pthread.h>
#endif
+#ifdef HAVE_LIBJIT
+#include <jit.h>
+#endif
+
#include "lisp.h"
#include "dispextern.h"
#include "intervals.h"
@@ -3214,6 +3218,13 @@ cleanup_vector (struct Lisp_Vector *vector)
finalize_one_mutex ((struct Lisp_Mutex *) vector);
else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_CONDVAR))
finalize_one_condvar ((struct Lisp_CondVar *) vector);
+ else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_COMPILED)
+ && (void *)vector->contents[COMPILED_JIT_ID] != NULL)
+ {
+ jit_function_t func =
+ (jit_function_t )vector->contents[COMPILED_JIT_ID];
+ jit_context_destroy (jit_function_get_context (func));
+ }
}
/* Reclaim space used by unmarked vectors. */
- [Emacs-diffs] nick.lloyd-bytecode-jit updated (a35c6fd -> 932eacc), Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 82f54dd 2/9: ; Fix compiler warnings in src/bytecode-jit.c, Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit fcc76c6 7/9: Free JIT contexts when compiled functions cleaned up,
Nickolas Lloyd <=
- [Emacs-diffs] nick.lloyd-bytecode-jit 223bcfe 6/9: ; Store jit_function_t value instead of closure., Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 1b8bb2d 8/9: ; Fix a performance regression in bytecode JIT compiler, Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 86357df 4/9: ; Change JIT_* macros to return a value., Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 68c56c0 3/9: ; Create a new context for each JIT compilation., Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 932eacc 9/9: Avoid extra calls to `jit_function_to_closure', Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit f33ff0c 1/9: Use inline functions instead of macros for JIT operations., Nickolas Lloyd, 2017/01/29
- [Emacs-diffs] nick.lloyd-bytecode-jit 639dfad 5/9: ; Make JIT compilation loop more readable., Nickolas Lloyd, 2017/01/29