diff options
author | Andy Wingo <wingo@pobox.com> | 2016-11-16 22:37:54 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-11-16 22:55:45 +0100 |
commit | ca74e3fae52dd23f8e8f12194d07041e207f68e7 (patch) | |
tree | 8408d8670749d34b4686d93186dd7ec3605a9d64 /libguile/vm-engine.c | |
parent | fcb43488b39db6c2ad15c2dc7f7b53aa492021b4 (diff) |
Add handle-interrupts inst and compiler pass
* libguile/vm-engine.c (vm_engine): Remove initial VM_HANDLE_INTERRUPTS
call; surely our caller already handled interrupts. Add
handle-interrupts opcode.
* am/bootstrap.am (SOURCES):
* module/Makefile.am (SOURCES): Add handle-interrupts.scm.
* module/system/vm/assembler.scm (system):
* module/language/cps/compile-bytecode.scm (compile-function):
(lower-cps): Add handle-interrupts support.
* module/language/cps/handle-interrupts.scm: New file.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 4f66b9e7d..4de1971c2 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -511,8 +511,6 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp, /* Load VM registers. */ CACHE_REGISTER (); - VM_HANDLE_INTERRUPTS; - /* Usually a call to the VM happens on application, with the boot continuation on the next frame. Sometimes it happens after a non-local exit however; in that case the VM state is all set up, @@ -3922,7 +3920,16 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp, NEXT (3); } - VM_DEFINE_OP (183, unused_183, NULL, NOP) + /* handle-interrupts _:24 + * + * Handle pending interrupts. + */ + VM_DEFINE_OP (183, handle_interrupts, "handle-interrupts", OP1 (X32)) + { + VM_HANDLE_INTERRUPTS; + NEXT (1); + } + VM_DEFINE_OP (184, unused_184, NULL, NOP) VM_DEFINE_OP (185, unused_185, NULL, NOP) VM_DEFINE_OP (186, unused_186, NULL, NOP) |