about summary refs log tree commit diff stats
path: root/apps/tile
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-26 21:24:43 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-26 21:24:43 -0700
commit71418907f69cd29ea9a07e7b2f80d51bcec3bba2 (patch)
treecbf157c6a6e06f58b006d9b1f1b721431bcfbbc6 /apps/tile
parentddcc5dfe3ace122c7a74376c8b79dbb819c13820 (diff)
downloadmu-71418907f69cd29ea9a07e7b2f80d51bcec3bba2.tar.gz
7115
Diffstat (limited to 'apps/tile')
-rw-r--r--apps/tile/gap-buffer.mu2
-rw-r--r--apps/tile/rpn.mu10
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/tile/gap-buffer.mu b/apps/tile/gap-buffer.mu
index cfd3d02d..07ce68a3 100644
--- a/apps/tile/gap-buffer.mu
+++ b/apps/tile/gap-buffer.mu
@@ -31,7 +31,7 @@ fn gap-buffer-to-string self: (addr gap-buffer), out: (addr handle array byte) {
   var s-storage: (stream byte 0x100)
   var s/ecx: (addr stream byte) <- address s-storage
   emit-gap-buffer self, s
-  stream-to-string s, out
+  stream-to-array s, out
 }
 
 fn emit-gap-buffer _self: (addr gap-buffer), out: (addr stream byte) {
diff --git a/apps/tile/rpn.mu b/apps/tile/rpn.mu
index fcfb25be..641350a6 100644
--- a/apps/tile/rpn.mu
+++ b/apps/tile/rpn.mu
@@ -161,7 +161,7 @@ fn evaluate functions: (addr handle function), bindings: (addr table), scratch:
         var s-addr/ecx: (addr stream byte) <- address s
         read-line-buffered file, s-addr
         var target/eax: (addr handle array byte) <- get target-val, text-data
-        stream-to-string s-addr, target
+        stream-to-array s-addr, target
         # save result into target-val
         var type-addr/eax: (addr int) <- get target-val, type
         copy-to *type-addr, 1  # string
@@ -192,7 +192,7 @@ fn evaluate functions: (addr handle function), bindings: (addr table), scratch:
         # create binding from curr-stream to target-val
         var key-h: (handle array byte)
         var key/ecx: (addr handle array byte) <- address key-h
-        stream-to-string curr-stream, key
+        stream-to-array curr-stream, key
         bind-in-table bindings, key, target-val
         # process next line if necessary
         var line/eax: (addr line) <- copy scratch
@@ -275,7 +275,7 @@ fn evaluate functions: (addr handle function), bindings: (addr table), scratch:
         break-if-=
         var tmp: (handle array byte)
         var curr-string-ah/edx: (addr handle array byte) <- address tmp
-        stream-to-string curr-stream, curr-string-ah  # unfortunate leak
+        stream-to-array curr-stream, curr-string-ah  # unfortunate leak
         var curr-string/eax: (addr array byte) <- lookup *curr-string-ah
         var val-storage: (handle value)
         var val-ah/edi: (addr handle value) <- address val-storage
@@ -296,7 +296,7 @@ fn evaluate functions: (addr handle function), bindings: (addr table), scratch:
         break-if-!=
         var h: (handle array byte)
         var s/eax: (addr handle array byte) <- address h
-        unquote-stream-to-string curr-stream, s  # leak
+        unquote-stream-to-array curr-stream, s  # leak
         push-string-to-value-stack out, *s
         break $evaluate:process-word
       }
@@ -311,7 +311,7 @@ fn evaluate functions: (addr handle function), bindings: (addr table), scratch:
         # wastefully create a new input string to strip quotes
         var h: (handle array value)
         var input-ah/eax: (addr handle array byte) <- address h
-        unquote-stream-to-string curr-stream, input-ah  # leak
+        unquote-stream-to-array curr-stream, input-ah  # leak
         # wastefully parse input into int-array
         # TODO: support parsing arrays of other types
         var input/eax: (addr array byte) <- lookup *input-ah