guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 02/02: Fix JIT compilation of call-with-prompt


From: Andy Wingo
Subject: [Guile-commits] 02/02: Fix JIT compilation of call-with-prompt
Date: Wed, 29 Aug 2018 14:00:57 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit c02c89d533d9b8ccda6e6755232812c6ec4d645a
Author: Andy Wingo <address@hidden>
Date:   Wed Aug 29 20:00:03 2018 +0200

    Fix JIT compilation of call-with-prompt
    
    * libguile/jit.c (compile_prompt): Actually push the MRA arg.
      (analyze): Mark call continuations as entries, as both FP and SP are
      set then, and also mark prompt handlers as entries (and blocks).
---
 libguile/jit.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/libguile/jit.c b/libguile/jit.c
index 91156be..e6e8997 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -2142,6 +2142,7 @@ compile_prompt (scm_jit_state *j, uint32_t tag, uint8_t 
escape_only_p,
   jit_pushargr (FP);
   jit_pushargi ((uintptr_t) vcode);
   mra = emit_movi (j, T2, 0);
+  jit_pushargr (T2);
   jit_finishi (scm_vm_intrinsics.push_prompt);
   clear_scratch_register_state (j);
   emit_reload_sp (j);
@@ -4278,11 +4279,22 @@ analyze (scm_jit_state *j)
           break;
 
         case scm_op_j:
-          attrs |= OP_ATTR_BLOCK;
           target = j->ip + (((int32_t)j->ip[0]) >> 8);
           j->op_attrs[target - j->start] |= OP_ATTR_BLOCK;
           break;
 
+        case scm_op_call:
+        case scm_op_call_label:
+          attrs = OP_ATTR_BLOCK;
+          target = j->next_ip;
+          j->op_attrs[target - j->start] |= OP_ATTR_BLOCK | OP_ATTR_ENTRY;
+          break;
+
+        case scm_op_prompt:
+          target = j->ip + (((int32_t) j->ip[2]) >> 8);
+          j->op_attrs[target - j->start] |= OP_ATTR_BLOCK | OP_ATTR_ENTRY;
+          break;
+
         default:
           break;
         }



reply via email to

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