;
: restore-return-stack ( continuation -- )
- R> \ store top of return stack on PS
- continuation->rstack-list
- 2dup >R >R
-
- ( Allocate stack space first using rsp!,
- then copy objects from list. )
- car drop
- rsp0 + rsp!
+ R> -rot \ store top of return stack on PS
+ continuation->rstack-list
+ 2dup print 2dup
- R> R> 2dup cdr
- 2swap
- car drop 0 swap do
- 2dup car drop
- rsp0 i + 1 + !
- cdr
- 1- +loop
+ \ TODO: Implement body of return stack restoration
- 2drop
- trace
>R \ restore original top of return stack
;
2dup >R >R
restore-param-stack
+
+ ." ====== PARAM STACK RESTORED ======" cr
+ trace
+
R> R>
restore-return-stack
;
\ }}}
+\ DEBUGGING
xxxx
\ ---- Loading files ---- {{{