make catch cache and restore vm regs, not the vm itself -- speedy speedy
authorAndy Wingo <wingo@pobox.com>
Tue, 3 Feb 2009 23:09:38 +0000 (00:09 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 3 Feb 2009 23:09:38 +0000 (00:09 +0100)
commit747a163532590459f2d2f83a405fd604d382c5ce
tree5a486abd0fee034c39c3e8a52c4d76658ec57ae0
parentf775e51bceb7399893b01380c5b56a7b665b782a
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.
libguile/throw.c
libguile/vm-engine.c
libguile/vm-i-system.c
libguile/vm.c