refactor vm application of non-programs; boot continuation refactor
authorAndy Wingo <wingo@pobox.com>
Thu, 10 May 2012 10:43:33 +0000 (12:43 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 10 May 2012 10:59:45 +0000 (12:59 +0200)
commit67b699cc77d5e2f74daca77aa26b1ba8af0d0808
tree42dd52d6cad54d3c5acf63796bf17ffc87ad6bca
parent0eba699d12f638c624efcdc2b617b0aa9099ee1f
refactor vm application of non-programs; boot continuation refactor

* libguile/frames.c (scm_frame_instruction_pointer):
* module/system/vm/frame.scm (frame-bindings):
  (frame-next-source, frame-call-representation): Fix a few locations
  that thought that the frame-procedure will always be a VM
  procedure.  This will not not be the case when traversing the stack of
  an application of a non-procedure.

* libguile/vm-i-system.c (call, tail-call, mv-call): Instead of
  special-casing structs and smobs at these call sites, just set up the
  stack, and jump to a generic apply loop if the proc is not a program.

* libguile/vm-engine.c: The generic apply loop is here.  Also, the boot
  program is now simply a boot continuation, and can handle any number
  of arguments.

* libguile/vm.c (make_boot_program): Update the code that makes the boot
  continuation.
libguile/frames.c
libguile/vm-engine.c
libguile/vm-i-system.c
libguile/vm.c
module/system/vm/frame.scm