Fix total pattern match verification
[scheme.git] / abi.md
diff --git a/abi.md b/abi.md
index eafb1748dbe009d527203948dd705cbed99ce486..0dbbcc4942b21515229a11ad8f1945f1c22163a6 100644 (file)
--- a/abi.md
+++ b/abi.md
@@ -11,6 +11,15 @@ when allocating, use first free block, move up free pointer
 when freeing, do ???
 
 
+# ownership
+
+```
+(let ([s "hello"])  <- s should be a linear string
+  (mkpair
+    (lambda () (print s))               <- two references to s?
+    (lambda () (print (reverse s)))))
+```
+
 # closures
 
 * lambda: actual function containing the code
@@ -53,3 +62,8 @@ e.g.
 
 * param 0: pointer to the value of `x`
 * param 1: the value of`y`
+
+# inter-function and stack values
+
+ints, bools and closures are passed around within functions in `%rax`.
+adts are passed on the stack, at whatever stack index the code generation was called with.
\ No newline at end of file