summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-08-29 20:00:03 +0200
committerAndy Wingo <wingo@pobox.com>2018-08-29 20:00:03 +0200
commitc02c89d533d9b8ccda6e6755232812c6ec4d645a (patch)
tree00317cb7dbda127492334f2dbf7669f98687b2b4
parent66fb76db2bf6171d4d0ab1f7c8de4487b7b34001 (diff)
downloadguile-c02c89d533d9b8ccda6e6755232812c6ec4d645a.tar.gz
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).
-rw-r--r--libguile/jit.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libguile/jit.c b/libguile/jit.c
index 91156be1f..e6e899775 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;
}