[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
- [Guile-commits] branch lightning updated (950a762 -> b8a9a66), Andy Wingo, 2018/07/29
- [Guile-commits] 04/06: Emit instrument-entry before programs, Andy Wingo, 2018/07/29
- [Guile-commits] 02/06: Add instrument-call, instrument-loop VM instructions, Andy Wingo, 2018/07/29
- [Guile-commits] 03/06: Emit instrument-loop in loops., Andy Wingo, 2018/07/29
- [Guile-commits] 01/06: Update frames.h comments.,
Andy Wingo <=
- [Guile-commits] 05/06: Fix function bound offsets of JIT data to be signed, Andy Wingo, 2018/07/29
- [Guile-commits] 06/06: Rewrite subr implementation, Andy Wingo, 2018/07/29