mirror of
https://gitlab.cs.washington.edu/fidelp/frustration.git
synced 2024-11-16 07:48:10 +01:00
clarification
This commit is contained in:
parent
8dee9a9bbc
commit
093e583131
1 changed files with 4 additions and 4 deletions
|
@ -64,8 +64,8 @@ The rdrop word is the "subroutine to drop the return address".
|
|||
Here is why it works.
|
||||
|
||||
Start of tail-recursive subroutine: Return-stack: { caller }
|
||||
After calling A: Return-stack: { caller caller }
|
||||
After calling B: Return-stack: { caller }
|
||||
At the end of line A: Return-stack: { caller caller }
|
||||
At the end of line B: Return-stack: { caller }
|
||||
|
||||
In other words, the back-to-back calls to A and B cancel each other out.
|
||||
|
||||
|
@ -73,8 +73,8 @@ In the body of the loop: Return-stack: { caller }
|
|||
|
||||
Meaning you can break out of the loop with RET.
|
||||
|
||||
At subroutine call to B: Return-stack: { caller C }
|
||||
After calling B: Return-stack: { caller }
|
||||
At subroutine call to line B: Return-stack: { caller C }
|
||||
At the end of line B: Return-stack: { caller }
|
||||
|
||||
And now we are at the top of the loop again.
|
||||
|
||||
|
|
Loading…
Reference in a new issue