about summary refs log tree commit diff stats
path: root/apps/dquotes.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-01-12 12:11:15 -0800
committerKartik Agaram <vc@akkartik.com>2020-01-12 14:49:35 -0800
commitf1eade728695ed3f52ae4e13f0a91dfe769e8567 (patch)
treed43079a8127487ecf9837600961f333e41ab7320 /apps/dquotes.subx
parente064f1bbfdbd4386d752fbb750bf36d91dce413b (diff)
downloadmu-f1eade728695ed3f52ae4e13f0a91dfe769e8567.tar.gz
5883 - drop the `ref` keyword
When I created it I was conflating two things:
a) needing to refer to just the start, rather than the whole, and
b) counting indirections.

Both are kinda ill-posed. Now Mu will have just `addr` and `handle` types.
Normal types will translate implicitly to `addr` types, while `handle`
will always require explicit handling.
Diffstat (limited to 'apps/dquotes.subx')
-rw-r--r--apps/dquotes.subx14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/dquotes.subx b/apps/dquotes.subx
index adade39a..5396d26e 100644
--- a/apps/dquotes.subx
+++ b/apps/dquotes.subx
@@ -56,7 +56,7 @@ Entry:  # run tests if necessary, convert stdin if not
     eb/jump  $subx-dquotes-main:end/disp8
 $subx-dquotes-main:interactive:
     # - otherwise convert stdin
-    # var ed/eax : (ref exit-descriptor)
+    # var ed/eax : exit-descriptor
     81          5/subop/subtract    3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # subtract from esp
     89/copy                         3/mod/direct    0/rm32/eax    .           .             .           4/r32/esp   .               .                 # copy esp to eax
     # configure ed to really exit()
@@ -84,7 +84,7 @@ $subx-dquotes-main:end:
 
 subx-dquotes:  # in : (addr buffered-file), out : (addr buffered-file)
     # pseudocode:
-    #   var line : (ref stream byte 512)
+    #   var line : (stream byte 512)
     #   var new-data-segment : (handle stream byte) = new-stream(Heap, Segment-size, 1)
     #
     #   write(new-data-segment, "== data\n")
@@ -125,13 +125,13 @@ subx-dquotes:  # in : (addr buffered-file), out : (addr buffered-file)
     53/push-ebx
     56/push-esi
     57/push-edi
-    # var line/ecx : (ref stream byte 512)
+    # var line/ecx : (stream byte 512)
     81          5/subop/subtract    3/mod/direct    4/rm32/esp    .           .             .           .           .               0x200/imm32       # subtract from esp
     68/push  0x200/imm32/length
     68/push  0/imm32/read
     68/push  0/imm32/write
     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # var word-slice/edx : (ref slice)
+    # var word-slice/edx : slice
     68/push  0/imm32/end
     68/push  0/imm32/start
     89/copy                         3/mod/direct    2/rm32/edx    .           .             .           4/r32/esp   .               .                 # copy esp to edx
@@ -300,7 +300,7 @@ process-string-literal:  # string-literal : (addr slice), out : (addr buffered-f
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
     # . save registers
     51/push-ecx
-    # var int32-stream/ecx : (ref stream byte 10)  # number of decimal digits a 32-bit number can have
+    # var int32-stream/ecx : (stream byte 10)  # number of decimal digits a 32-bit number can have
     81          5/subop/subtract    3/mod/direct    4/rm32/esp    .           .             .           .           .               0xa/imm32         # subtract from esp
     68/push  0xa/imm32/decimal-digits-in-32bit-number
     68/push  0/imm32/read
@@ -1381,7 +1381,7 @@ test-emit-string-literal-data-handles-newline-escape:
 # emit everything from a word except the initial datum
 emit-metadata:  # out : (addr buffered-file), word : (addr slice)
     # pseudocode
-    #   var slice : (ref slice) = {0, word->end}
+    #   var slice : slice = {0, word->end}
     #   curr = word->start
     #   if *curr == '"'
     #     curr = skip-string-in-slice(curr, word->end)
@@ -1410,7 +1410,7 @@ emit-metadata:  # out : (addr buffered-file), word : (addr slice)
     8b/copy                         0/mod/indirect  6/rm32/esi    .           .             .           1/r32/ecx   .               .                 # copy *esi to ecx
     # var end/edx : (addr byte) = word->end
     8b/copy                         1/mod/*+disp8   6/rm32/esi    .           .             .           2/r32/edx   4/disp8         .                 # copy *(esi+4) to edx
-    # var slice/ebx : (ref slice) = {0, end}
+    # var slice/ebx : slice = {0, end}
     52/push-edx
     68/push  0/imm32
     89/copy                         3/mod/direct    3/rm32/ebx    .           .             .           4/r32/esp   .               .                 # copy esp to ebx