guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/02: Tweak to instrument-entry


From: Andy Wingo
Subject: [Guile-commits] 02/02: Tweak to instrument-entry
Date: Mon, 20 Aug 2018 06:45:57 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 916c5705572d1be977dcb30db8b95c458932e453
Author: Andy Wingo <address@hidden>
Date:   Mon Aug 20 12:45:07 2018 +0200

    Tweak to instrument-entry
    
    * libguile/vm-engine.c (instrument-entry): Eagerly check if data->mcode
      is already set, and in that case just jump directly without checking
      the counter.
---
 libguile/vm-engine.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index e8787ee..c8db813 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -463,6 +463,14 @@ VM_NAME (scm_thread *thread)
 
       data = (struct scm_jit_function_data *) (ip + data_offset);
 
+      if (data->mcode)
+        {
+          SYNC_IP ();
+          scm_jit_enter_mcode (thread, data->mcode);
+          CACHE_REGISTER ();
+          NEXT (0);
+        }
+
       if (data->counter > SCM_JIT_COUNTER_THRESHOLD)
         {
           const uint8_t *mcode;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]