fix stack corruption on vm-save-stack; more robust with nonlocal exits
* module/system/repl/command.scm: Coerce rationals to floats.
* module/system/vm/program.scm (program-documentation): Fix a typo, doh!
* src/vm.c (vm_reset_stack, struct vm_unwind_data): Add unwind handler to
reset vp->sp, vp->fp, and vp->this_frame when performing a nonlocal
exit from a vm_run.
(vm_heapify_frames_1): Don't repack the stack, it causes stack
corruption. I think we need spaghetti stacks to handle continuations,
not separate heap frames. I don't think call/cc is working now.
(vm-save-stack): Don't call heapify_frames, that modifies the stack
that we're copying. Instead call its helper, heapify_1.
* src/vm_engine.c (vm_run): Set up the vm_reset_stack unwind handler.
* src/vm_engine.h (IP_REG, SP_REG, FP_REG): If we got through all of the
checks without having these macros defined, define them as empty.
Happens on x86-64.
* src/vm_system.c (halt): End the dynwind before we return from the VM.
* src/vm_scheme.c (REL): Sync the regs before calling scm_lt_p et al,
cause they can do a nonlocal exit.