about summary refs log tree commit diff stats
path: root/093array-equal.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 /093array-equal.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 '093array-equal.subx')
-rw-r--r--093array-equal.subx26
1 files changed, 13 insertions, 13 deletions
diff --git a/093array-equal.subx b/093array-equal.subx
index eba1fe8a..27910620 100644
--- a/093array-equal.subx
+++ b/093array-equal.subx
@@ -93,10 +93,10 @@ test-compare-empty-with-empty-array:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array _) = []
+    # var ecx : (array _) = []
     68/push  0/imm32/size
     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # var edx : (ref array _) = []
+    # var edx : (array _) = []
     68/push  0/imm32/size
     89/copy                         3/mod/direct    2/rm32/edx    .           .             .           4/r32/esp   .               .                 # copy esp to edx
     # eax = array-equal?(ecx, edx)
@@ -125,11 +125,11 @@ test-compare-empty-with-non-empty-array:  # also checks length-mismatch code pat
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1]
+    # var ecx : (array int) = [1]
     68/push  1/imm32
     68/push  4/imm32/size
     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # var edx : (ref array int) = []
+    # var edx : (array int) = []
     68/push  0/imm32/size
     89/copy                         3/mod/direct    2/rm32/edx    .           .             .           4/r32/esp   .               .                 # copy esp to edx
     # eax = array-equal?(ecx, edx)
@@ -158,13 +158,13 @@ test-compare-equal-arrays:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1, 2, 3]
+    # var ecx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32
     68/push  0xc/imm32/size
     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # var edx : (ref array int) = [1, 2, 3]
+    # var edx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32
@@ -196,13 +196,13 @@ test-compare-inequal-arrays-equal-lengths:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1, 4, 3]
+    # var ecx : (array int) = [1, 4, 3]
     68/push  3/imm32
     68/push  4/imm32
     68/push  1/imm32
     68/push  0xc/imm32/size
     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # var edx : (ref array int) = [1, 2, 3]
+    # var edx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32
@@ -243,7 +243,7 @@ parse-array-of-ints:  # ad : (addr allocation-descriptor), s : (addr string) ->
     #     ++size
     #   result = allocate(ad, (size+1)*4)
     #   result->size = (size+1)*4
-    #   var slice : (ref slice) = {s->data, 0}
+    #   var slice : slice = {s->data, 0}
     #   out = result->data
     #   while true
     #     if (slice->start >= end) break
@@ -326,7 +326,7 @@ $parse-array-of-ints:break1:
     # result->size = size
     89/copy                         0/mod/indirect  0/rm32/eax    .           .             .           3/r32/ebx   .               .                 # copy ebx to *eax
 $parse-array-of-ints:pass2:
-    # var slice/ecx : (ref slice) = {s->data, 0}
+    # var slice/ecx : slice = {s->data, 0}
     # . push 0
     68/push  0/imm32/end
     # . push s->data
@@ -404,7 +404,7 @@ test-parse-array-of-ints:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1, 2, 3]
+    # var ecx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32
@@ -498,7 +498,7 @@ test-parse-array-of-ints-extra-whitespace:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1, 2, 3]
+    # var ecx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32
@@ -582,7 +582,7 @@ test-check-array-equal:
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
-    # var ecx : (ref array int) = [1, 2, 3]
+    # var ecx : (array int) = [1, 2, 3]
     68/push  3/imm32
     68/push  2/imm32
     68/push  1/imm32