diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-12-08 13:56:46 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-12-08 23:31:05 -0800 |
commit | 2a2a5b1e43b6aa650a41ab1ec68d9778c14cb649 (patch) | |
tree | 734619639755cf5b95490bdc4362bbef0a504881 /060read.subx | |
parent | a93cd189c95fc82a8f1db4e42e5f278bc642bb0c (diff) | |
download | mu-2a2a5b1e43b6aa650a41ab1ec68d9778c14cb649.tar.gz |
5804
Try to make the comments consistent with the type system we'll eventually have.
Diffstat (limited to '060read.subx')
-rw-r--r-- | 060read.subx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/060read.subx b/060read.subx index 1fe37da7..34658b7b 100644 --- a/060read.subx +++ b/060read.subx @@ -45,7 +45,7 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -read: # f : fd or (address stream), s : (address stream) -> num-bytes-read/eax +read: # f : fd or (address stream byte), s : (address stream byte) -> num-bytes-read/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -191,12 +191,11 @@ $_buffer-4:end: 5d/pop-to-ebp c3/return - # idea: a clear-if-empty method on streams that clears only if f->read == f->write # Unclear how I'd use it, though. Callers seem to need the check anyway. # Maybe a better helper would be 'empty-stream?' -_read: # fd : int, s : (address stream) -> num-bytes-read/eax +_read: # fd : int, s : (address stream byte) -> num-bytes-read/eax : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -427,7 +426,7 @@ test-read-returns-0-on-end-of-file: == data -_test-tmp-stream: +_test-tmp-stream: # (ref stream byte) # current write index 0/imm32 # current read index |