about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-08 17:02:09 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-08 17:02:09 -0700
commit476049a09da496c265e5a9b24466da1b28d66ef6 (patch)
treed0168f2da7b3b33b45eb6bae0e6cd6f22a868ab3 /subx/apps
parentfe77a29e6a365427c2ff780d5f559e227033ad8e (diff)
downloadmu-476049a09da496c265e5a9b24466da1b28d66ef6.tar.gz
.
Be more consistent about names of ends of a slice.
(In the opposite direction compared to last night's 925fc490d2ce8b8d411de87bd0af5b3a8a704213.)
Diffstat (limited to 'subx/apps')
-rw-r--r--subx/apps/assort.subx4
-rw-r--r--subx/apps/dquotes.subx34
-rw-r--r--subx/apps/pack.subx40
-rw-r--r--subx/apps/subx-common.subx20
-rw-r--r--subx/apps/survey.subx16
5 files changed, 57 insertions, 57 deletions
diff --git a/subx/apps/assort.subx b/subx/apps/assort.subx
index 5e3cba8c..372cf663 100644
--- a/subx/apps/assort.subx
+++ b/subx/apps/assort.subx
@@ -485,8 +485,8 @@ read-segments:  # in : (address buffered-file), table : (address stream {string,
     68/push  0/imm32/write
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var word-slice/EDX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    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
 $read-segments:loop:
     # clear-stream(line)
diff --git a/subx/apps/dquotes.subx b/subx/apps/dquotes.subx
index a4c146a1..0060e55c 100644
--- a/subx/apps/dquotes.subx
+++ b/subx/apps/dquotes.subx
@@ -121,8 +121,8 @@ convert:  # in : (address buffered-file), out : (address buffered-file) -> <void
     68/push  0/imm32/write
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var word-slice/EDX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    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
     # new-data-segment/EDI = new-stream(Heap, Segment-size, 1)
     # . EAX = new-stream(Heap, Segment-size, 1)
@@ -1096,8 +1096,8 @@ test-emit-string-literal-data-empty:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = '""'
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-string-literal-data(_test-output-stream, slice)
     # . . push args
@@ -1290,7 +1290,7 @@ emit-metadata:  # out : (address buffered-file), word : (address slice)
     #       if *curr == '/'
     #         break
     #       ++curr
-    #   slice->curr = curr
+    #   slice->start = curr
     #   write-slice-buffered(out, slice)
     #
     # . prolog
@@ -1344,7 +1344,7 @@ $emit-metadata:skip-datum-loop:
     41/increment-ECX
     eb/jump  $emit-metadata:skip-datum-loop/disp8
 $emit-metadata:emit:
-    # slice->curr = ECX
+    # slice->start = ECX
     89/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           1/r32/ECX   .               .                 # copy ECX to *EBX
     # write-slice-buffered(out, slice)
     # . . push args
@@ -1629,7 +1629,7 @@ test-emit-metadata-in-string-literal:
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = "\"abc/def\"/ghi"
     68/push  _test-slice-literal-string-with-limit/imm32
-    68/push  _test-slice-literal-string/imm32/curr
+    68/push  _test-slice-literal-string/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-metadata(_test-output-buffered-file, slice)
     # . . push args
@@ -1795,8 +1795,8 @@ test-next-word-or-string:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-input-stream, "  ab")
     # . . push args
@@ -1868,8 +1868,8 @@ test-next-word-or-string-returns-whole-comment:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-input-stream, "  # a")
     # . . push args
@@ -1941,8 +1941,8 @@ test-next-word-or-string-returns-empty-string-on-eof:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write nothing to _test-input-stream
     # next-word-or-string(_test-input-stream, slice)
@@ -1983,8 +1983,8 @@ test-next-word-or-string-returns-whole-string:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-input-stream, " \"a b\"/imm32 ")
     # . . push args
@@ -2046,8 +2046,8 @@ test-next-word-or-string-returns-string-with-escapes:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-input-stream, " \"a\\\"b\"/x")
     # . . push args
diff --git a/subx/apps/pack.subx b/subx/apps/pack.subx
index 71d13726..8cd24813 100644
--- a/subx/apps/pack.subx
+++ b/subx/apps/pack.subx
@@ -132,8 +132,8 @@ convert:  # in : (address buffered-file), out : (address buffered-file) -> <void
     68/push  0/imm32/write
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var word-slice/EDX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    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
     # var in-code?/EBX = false
     31/xor                          3/mod/direct    3/rm32/EBX    .           .             .           3/r32/EBX   .               .                 # clear EBX
@@ -957,8 +957,8 @@ convert-data:  # line : (address stream byte), out : (address buffered-file) ->
     51/push-ECX
     52/push-EDX
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
 #?     # dump line {{{
 #?     # . write(2/stderr, "LL: ")
@@ -1870,8 +1870,8 @@ convert-instruction:  # line : (address stream byte), out : (address buffered-fi
     51/push-ECX
     52/push-EDX
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # next-word(line, word-slice)
     # . . push args
@@ -2027,12 +2027,12 @@ emit-opcodes:  # line : (address stream byte), out : (address buffered-file) ->
     52/push-EDX
     53/push-EBX
     # var op1/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var op2/EDX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    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
     # rewind-stream(line)
     # . . push args
@@ -2318,8 +2318,8 @@ emit-modrm:  # line : (address stream byte), out : (address buffered-file) -> <v
     56/push-ESI
     57/push-EDI
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var has-modrm?/EDX = false
     31/xor                          3/mod/direct    2/rm32/EDX    .           .             .           2/r32/EDX   .               .                 # clear EDX
@@ -2629,8 +2629,8 @@ emit-sib:  # line : (address stream byte), out : (address buffered-file) -> <voi
     56/push-ESI
     57/push-EDI
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # var has-sib?/EDX = false
     31/xor                          3/mod/direct    2/rm32/EDX    .           .             .           2/r32/EDX   .               .                 # clear EDX
@@ -2902,8 +2902,8 @@ emit-disp:  # line : (address stream byte), out : (address buffered-file) -> <vo
     51/push-ECX
     52/push-EDX
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # rewind-stream(line)
     # . . push args
@@ -3123,8 +3123,8 @@ emit-imm:  # line : (address stream byte), out : (address buffered-file) -> <voi
     51/push-ECX
     52/push-EDX
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # rewind-stream(line)
     # . . push args
@@ -5843,8 +5843,8 @@ parse-datum-of-word:  # word : (address slice) -> value/EAX
     # ESI = word
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           6/r32/ESI   8/disp8         .                 # copy *(EBP+8) to ESI
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # slice = next-token-from-slice(word->start, word->end, '/')
     # . . push args
diff --git a/subx/apps/subx-common.subx b/subx/apps/subx-common.subx
index b073a6c8..84108e55 100644
--- a/subx/apps/subx-common.subx
+++ b/subx/apps/subx-common.subx
@@ -612,8 +612,8 @@ test-next-word:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-stream, "  ab")
     # . . push args
@@ -675,8 +675,8 @@ test-next-word-returns-whole-comment:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write(_test-stream, "  # a")
     # . . push args
@@ -738,8 +738,8 @@ test-next-word-returns-empty-string-on-eof:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # write nothing to _test-stream
     # next-word(_test-stream, slice)
@@ -902,8 +902,8 @@ has-metadata?:  # word : (address slice), s : (address string) -> EAX : boolean
     # EDX = word->end
     8b/copy                         1/mod/*+disp8   6/rm32/ESI    .           .             .           2/r32/EDX   4/disp8         .                 # copy *(ESI+4) to EDX
     # var twig/EDI : (address slice) = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    7/rm32/EDI    .           .             .           4/r32/ESP   .               .                 # copy ESP to EDI
     # next-token-from-slice(word->start, word->end, '/', twig)
     # . . push args
@@ -1162,8 +1162,8 @@ emit:  # out : (address buffered-file), word : (address slice), width : int -> <
     # ESI = word
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           6/r32/ESI   0xc/disp8       .                 # copy *(EBP+12) to ESI
     # var name/EDI : (address slice) = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    7/rm32/EDI    .           .             .           4/r32/ESP   .               .                 # copy ESP to EDI
     # datum = next-token-from-slice(word->start, word->end, '/')
     # . . push args
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index 6f650470..53e75d8f 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -320,14 +320,14 @@ test-convert-computes-addresses:
 # global scratch space for compute-offsets in the data segment
 == data
 
-compute-offsets:curr-segment-name: 0/imm32/curr
-compute-offsets:curr-segment-name:end: 0/imm32/limit
+compute-offsets:curr-segment-name: 0/imm32/start
+compute-offsets:curr-segment-name:end: 0/imm32/end
 compute-offsets:file-offset: 0/imm32
 compute-offsets:segment-offset: 0/imm32
-compute-offsets:word-slice: 0/imm32/curr
-compute-offsets:word-slice:end: 0/imm32/limit
-compute-offsets:heap: 0/imm32/curr
-compute-offsets:heap:end: 0/imm32/limit
+compute-offsets:word-slice: 0/imm32/start
+compute-offsets:word-slice:end: 0/imm32/end
+compute-offsets:heap: 0/imm32/start
+compute-offsets:heap:end: 0/imm32/end
 
 == code
 
@@ -2137,8 +2137,8 @@ num-bytes:  # line : (address stream) -> EAX : int
     # var result/EAX = 0
     31/xor                          3/mod/direct    0/rm32/EAX    .           .             .           0/r32/EAX   .               .                 # clear EAX
     # var word-slice/ECX = {0, 0}
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
 #?     # dump line {{{
 #?     # . write(2/stderr, "LL: ")