guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/06: Update frames.h comments.


From: Andy Wingo
Subject: [Guile-commits] 01/06: Update frames.h comments.
Date: Sun, 29 Jul 2018 10:10:57 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 4b7af0b7fd22183a2c1ba6d48f338ce03e6faf59
Author: Andy Wingo <address@hidden>
Date:   Mon Jul 23 11:23:18 2018 +0200

    Update frames.h comments.
    
    * libguile/frames.h: Update to match reality.
---
 libguile/frames.h | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/libguile/frames.h b/libguile/frames.h
index 99c5dff..76055f5 100644
--- a/libguile/frames.h
+++ b/libguile/frames.h
@@ -40,7 +40,7 @@
    ------------------
 
    | ...                          |
-   +==============================+ <- fp + 2 = SCM_FRAME_PREVIOUS_SP (fp)
+   +==============================+ <- fp + 3 = SCM_FRAME_PREVIOUS_SP (fp)
    | Dynamic link                 |
    +------------------------------+
    | Virtual return address (vRA) |
@@ -59,7 +59,7 @@
    The stack grows down.
 
    The calling convention is that a caller prepares a stack frame
-   consisting of the saved FP, the saved virtual return addres, and the
+   consisting of the saved FP, the saved virtual return address, and the
    saved machine return address of the calling function, followed by the
    procedure and then the arguments to the call, in order.  Thus in the
    beginning of a call, the procedure being called is in slot 0, the
@@ -73,14 +73,10 @@
    popping the stack pointer during the call's extent.
 
    When a program returns, it returns its values in the slots starting
-   from local 1, as if the values were arguments to a tail call.  We
-   start from 1 instead of 0 for the convenience of the "values" builtin
-   function, which can just leave its arguments in place.
-
-   The callee resets the stack pointer to point to the last value.  In
-   this way the caller knows how many values there are: it's the number
-   of words between the stack pointer and the slot at which the caller
-   placed the procedure.
+   from local 0.  The callee resets the stack pointer to point to the
+   last value.  In this way the caller knows how many values there are:
+   it's the number of words between the stack pointer and the slot at
+   which the caller placed the procedure.
 
    After checking that the number of values returned is appropriate, the
    caller shuffles the values around (if needed), and resets the stack



reply via email to

[Prev in Thread] Current Thread [Next in Thread]