diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-04 00:09:38 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-04 00:09:38 +0100 |
commit | 747a163532590459f2d2f83a405fd604d382c5ce (patch) | |
tree | 5a486abd0fee034c39c3e8a52c4d76658ec57ae0 /libguile/vm-engine.c | |
parent | f775e51bceb7399893b01380c5b56a7b665b782a (diff) | |
download | guile-747a163532590459f2d2f83a405fd604d382c5ce.tar.gz |
make catch cache and restore vm regs, not the vm itself -- speedy speedy
* libguile/throw.c (scm_c_catch): Stash away the current vm's regs, and
restore them if there's a nonlocal exit. There is a terrible case we
have to handle if we catch from when the vm smob type isn't registered
but the throw has the vm registered, but I think we handle this fine.
* libguile/vm-engine.c (vm_run):
* libguile/vm-i-system.c (halt): Don't make a dynwind context, so that
entering the VM doesn't cons at all, except for the arg list. Maybe we
can fix that bit too.
* libguile/vm.c (vm_reset_stack): Remove, as there is no more dynwind.
(make_vm): Return #f if the tc16 hasn't yet been registered.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 97684d90b..2be9b46b3 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -72,7 +72,6 @@ vm_run (SCM vm, SCM program, SCM args) #if VM_USE_HOOKS SCM hook_args = SCM_LIST1 (vm); #endif - struct vm_unwind_data wind_data; #ifdef HAVE_LABELS_AS_VALUES static void **jump_table = NULL; @@ -92,19 +91,6 @@ vm_run (SCM vm, SCM program, SCM args) } #endif - /* dynwind ended in the halt instruction */ - scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE); - wind_data.vp = vp; - wind_data.sp = vp->sp; - wind_data.fp = vp->fp; - scm_dynwind_unwind_handler (vm_reset_stack, &wind_data, 0); - - /* could do this if we reified all vm stacks -- for now, don't bother changing - *the-vm* - if (scm_fluid_ref (scm_the_vm_fluid) != vm) - scm_dynwind_fluid (scm_the_vm_fluid, vm); - */ - /* Initialization */ { SCM prog = program; |