mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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).
This commit is contained in:
parent
66fb76db2b
commit
c02c89d533
1 changed files with 13 additions and 1 deletions
|
@ -2142,6 +2142,7 @@ compile_prompt (scm_jit_state *j, uint32_t tag, uint8_t escape_only_p,
|
||||||
jit_pushargr (FP);
|
jit_pushargr (FP);
|
||||||
jit_pushargi ((uintptr_t) vcode);
|
jit_pushargi ((uintptr_t) vcode);
|
||||||
mra = emit_movi (j, T2, 0);
|
mra = emit_movi (j, T2, 0);
|
||||||
|
jit_pushargr (T2);
|
||||||
jit_finishi (scm_vm_intrinsics.push_prompt);
|
jit_finishi (scm_vm_intrinsics.push_prompt);
|
||||||
clear_scratch_register_state (j);
|
clear_scratch_register_state (j);
|
||||||
emit_reload_sp (j);
|
emit_reload_sp (j);
|
||||||
|
@ -4278,11 +4279,22 @@ analyze (scm_jit_state *j)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case scm_op_j:
|
case scm_op_j:
|
||||||
attrs |= OP_ATTR_BLOCK;
|
|
||||||
target = j->ip + (((int32_t)j->ip[0]) >> 8);
|
target = j->ip + (((int32_t)j->ip[0]) >> 8);
|
||||||
j->op_attrs[target - j->start] |= OP_ATTR_BLOCK;
|
j->op_attrs[target - j->start] |= OP_ATTR_BLOCK;
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue