about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-07-18 19:31:01 -0700
committerKartik Agaram <vc@akkartik.com>2020-07-18 19:33:39 -0700
commit01b72aa06487b6818bdaae2dc2eb16d0b3b2d7ee (patch)
tree031f5a72fe9dfe76fabbc44cb228d7b7a6385589
parent02b7f9bd89fcae62c118772b1eb907b6c93055f0 (diff)
downloadmu-01b72aa06487b6818bdaae2dc2eb16d0b3b2d7ee.tar.gz
6659
Tighten up some function signatures.
-rw-r--r--120allocate.subx14
-rw-r--r--400.mu14
2 files changed, 14 insertions, 14 deletions
diff --git a/120allocate.subx b/120allocate.subx
index 4bcbe727..20595e64 100644
--- a/120allocate.subx
+++ b/120allocate.subx
@@ -63,7 +63,7 @@ $array-equal-main:end:
 
 # Allocate and clear 'n' bytes of memory from an allocation-descriptor 'ad'.
 # Abort if there isn't enough memory in 'ad'.
-allocate:  # ad: (addr allocation-descriptor), n: int, out: (addr handle)
+allocate:  # ad: (addr allocation-descriptor), n: int, out: (addr handle _)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -100,7 +100,7 @@ $allocate:end:
 
 # Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr.
 # Abort if there isn't enough memory in 'ad'.
-allocate-raw:  # ad: (addr allocation-descriptor), n: int, out: (addr handle)
+allocate-raw:  # ad: (addr allocation-descriptor), n: int, out: (addr handle _)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -253,7 +253,7 @@ test-allocate-raw-success:
     5d/pop-to-ebp
     c3/return
 
-lookup:  # h: (handle T) -> result/eax: (addr T)
+lookup:  # h: (handle _T) -> result/eax: (addr _T)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -455,7 +455,7 @@ _pending-test-lookup-failure:
     c3/return
 
 # when comparing handles, just treat them as pure values
-handle-equal?:  # a: handle, b: handle -> result/eax: boolean
+handle-equal?:  # a: (handle _T), b: (handle _T) -> result/eax: boolean
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -486,7 +486,7 @@ $handle-equal?:end:
     5d/pop-to-ebp
     c3/return
 
-copy-handle:  # src: handle, dest: (addr handle)
+copy-handle:  # src: (handle _T), dest: (addr handle _T)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -573,7 +573,7 @@ $allocate-region:abort:
 
 # Claim the next 'n+4' bytes of memory and initialize the first 4 to n.
 # Abort if there isn't enough memory in 'ad'.
-allocate-array:  # ad: (addr allocation-descriptor), n: int, out: (addr handle)
+allocate-array:  # ad: (addr allocation-descriptor), n: int, out: (addr handle _)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -707,7 +707,7 @@ test-allocate-array:
     5d/pop-to-ebp
     c3/return
 
-copy-array:  # ad: (addr allocation-descriptor), src: (addr array), out: (addr handle)
+copy-array:  # ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
diff --git a/400.mu b/400.mu
index fd31bb20..83661b56 100644
--- a/400.mu
+++ b/400.mu
@@ -69,14 +69,14 @@ sig parse-hex-int-from-slice in: (addr slice) -> result/eax: int
 sig is-hex-digit? c: byte -> result/eax: boolean
 #sig from-hex-char in/eax: byte -> out/eax: nibble
 sig error-byte ed: (addr exit-descriptor), out: (addr buffered-file), msg: (addr array byte), n: byte
-#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle)
-#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle)
-sig lookup h: (handle T) -> result/eax: (addr T)
-sig handle-equal? a: handle, b: handle -> result/eax: boolean
-sig copy-handle src: handle, dest: (addr handle)
+#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)
+#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)
+sig lookup h: (handle _T) -> result/eax: (addr _T)
+sig handle-equal? a: (handle _T), b: (handle _T) -> result/eax: boolean
+sig copy-handle src: (handle _T), dest: (addr handle _T)
 #sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor)
-#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle)
-sig copy-array ad: (addr allocation-descriptor), src: (addr array), out: (addr handle)
+#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)
+sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
 #sig zero-out start: (addr byte), size: int
 sig new-stream ad: (addr allocation-descriptor), length: int, elemsize: int, out: (addr handle stream _)
 sig read-line-buffered f: (addr buffered-file), s: (addr stream byte)