Frame pointer points to local 0 instead of local 1
* libguile/frames.h: Change so that fp points at local 0 instead of
local 1, and clean up a bit.
(struct scm_vm_frame): Remove program, and rename stack to locals.
(SCM_FRAME_DATA_ADDRESS): Remove; it was redundant with
SCM_FRAME_LOWER_ADDRESS.
(SCM_FRAME_STACK_ADDRESS): Remove; replace with the new
SCM_FRAME_LOCALS_ADDRESS.
(SCM_FRAME_UPPER_ADDRESS): Remove; unused.
(SCM_FRAME_NUM_LOCALS, SCM_FRAME_PREVIOUS_SP): New defines.
(SCM_FRAME_BYTE_CAST, SCM_FRAME_STACK_CAST): Remove; unused;
(SCM_FRAME_LOCAL): New define, replaces SCM_FRAME_VARIABLE.
(SCM_FRAME_PROGRAM): Add cautionary commentary.
* libguile/frames.c: Adapt static asserts.
(scm_frame_num_locals, scm_frame_local_ref, scm_frame_local_set_x):
Adapt. This means that frame-local-ref 0 now returns the procedure.
* libguile/vm-engine.c (ALLOC_FRAME, RESET_FRAME)
(FRAME_LOCALS_COUNT, LOCAL_REF, LOCAL_SET, RETURN_VALUE_LIST): Adapt
to change in fp.
(LOCAL_ADDRESS): New helper.
(POP_CONTINUATION_HOOK): Reimplement, taking the previous FP as an
argument.
(ABORT_CONTINUATION_HOOK): Reimplement, taking no arguments.
(RETURN_ONE_VALUE): Reimplement.
(RETURN_VALUE_LIST): Adapt to FP change.
(halt, return-values, subr-call, foreign-call, prompt)
(continuation-call, compose-continuation, call/cc, abort): Adapt to FP
change, mostly via using LOCAL_ADDRESS, etc abstractions instead of
using the raw frame pointer.
* libguile/control.c (reify_partial_continuation): Update for fp
change.
* libguile/vm.c (vm_reinstate_partial_continuation): Adapt to removal of
SCM_FRAME_UPPER_ADDRESS.
* module/system/vm/frame.scm (frame-call-representation): Adapt to
frame-local-ref change.
* module/system/vm/trace.scm (print-return): Remove unused
frame-num-locals call.