Reserve frame word for machine return address

* libguile/frames.h: Add machine return address to diagram.
  (SCM_FRAME_MACHINE_RETURN_ADDRESS):
  (SCM_FRAME_SET_MACHINE_RETURN_ADDRESS): New macros.
  (SCM_FRAME_PREVIOUS_SP):
  (SCM_FRAME_DYNAMIC_LINK):
  (SCM_FRAME_SET_DYNAMIC_LINK): Adapt for new frame size.
* libguile/vm-engine.c (halt): Set frame size to 3.
  (call, call-label): Set mRA to 0.
* libguile/vm.c (push_interrupt_frame, reinstate_continuation_x):
  (scm_call_n): Set frame size to 3.  In push_interrupt_frame, init the
  mRA of the frame.
  (vm_builtin_call_with_values_code, vm_handle_interrupt_code): Allocate
  larger frames.
* module/language/cps/slot-allocation.scm (allocate-slots): Frame size
  is 3.
* module/system/vm/disassembler.scm (define-clobber-parser): Bump frame
  size.
This commit is contained in:
Andy Wingo 2018-07-16 15:42:05 +02:00
commit 043432fd57
5 changed files with 33 additions and 24 deletions

View file

@ -615,7 +615,7 @@ address of that offset."
(lambda ()
(disassemble-one code (/ pos 4)))
(lambda (len elt)
(define frame-size 2)
(define frame-size 3)
(match elt
((_ proc . _)
(let lp ((slot (- proc frame-size)))