[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Disable some JIT compilation code when JIT config
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/01: Disable some JIT compilation code when JIT configured out |
Date: |
Mon, 19 Aug 2019 10:32:49 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 9d78665539ccfb318fdd2161eff2325f984dad71
Author: Andy Wingo <address@hidden>
Date: Mon Aug 19 16:31:29 2019 +0200
Disable some JIT compilation code when JIT configured out
* libguile/vm.c (vm_recompute_disable_mcode, capture_continuation):
Disable logic if JIT not configured.
---
libguile/vm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libguile/vm.c b/libguile/vm.c
index d7b1788..398a5f4 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -220,6 +220,10 @@ vm_hook_compute_enabled (scm_thread *thread, SCM hook,
uint8_t *enabled)
static void
vm_recompute_disable_mcode (scm_thread *thread)
{
+#if ENABLE_JIT
+ /* FIXME: Some of this logic works for ahead-of-time compilation
+ too. */
+
uint8_t was_disabled = thread->vm.disable_mcode;
thread->vm.disable_mcode = 0;
@@ -231,6 +235,7 @@ vm_recompute_disable_mcode (scm_thread *thread)
if (thread->vm.disable_mcode && !was_disabled)
scm_jit_clear_mcode_return_addresses (thread);
+#endif
}
static int
@@ -1152,8 +1157,10 @@ capture_continuation (scm_thread *thread)
{
struct scm_vm *vp = &thread->vm;
void *mra = SCM_FRAME_MACHINE_RETURN_ADDRESS (vp->fp);
+#ifdef ENABLE_JIT
if (mra == scm_jit_return_to_interpreter_trampoline)
mra = NULL;
+#endif
SCM vm_cont = capture_stack (vp->stack_top,
SCM_FRAME_DYNAMIC_LINK (vp->fp),
SCM_FRAME_PREVIOUS_SP (vp->fp),