This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: How often are continuations created?
Keisuke Nishida <kxn30@po.cwru.edu> writes:
[intermediate value rib]
> I don't know where they put intermediate results, but I guess they
> use local variables in the frame for every computation.
They push them directly onto the control frame. For example
(v 1 (p 9) 2) translates into
push 2
make-frame ;; -> push FRAME_DYNAMIC_LINK; push FRAME_RETURN_ADDRESS;
push 9
loadt p
call 1
push
push 1
make-frame
loadt v
call 3
A simple fix would be to turn the value stack into a scheme list and
push a pointer to it onto the control stack. -- Not elegant but the
hybrid solution needs a value rib anyway. :) But maybe there is a
better solution?
Jost