about summary refs log tree commit diff stats
path: root/apps/tile/word.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-25 16:58:18 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-25 16:58:18 -0700
commit2929ca471b36b604a868a1e7e5f0b74cf11c9b8f (patch)
tree6040ac39c3f0d307da5a10d83da0a11d089b4ea9 /apps/tile/word.mu
parentbf1b3155fb748601fa99decfcf33b5272f35fb64 (diff)
downloadmu-2929ca471b36b604a868a1e7e5f0b74cf11c9b8f.tar.gz
6857
Diffstat (limited to 'apps/tile/word.mu')
-rw-r--r--apps/tile/word.mu9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/tile/word.mu b/apps/tile/word.mu
index d8b7778a..8016a496 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -1,3 +1,12 @@
+fn initialize-word _self: (addr word) {
+  var self/esi: (addr word) <- copy _self
+  var data-ah/eax: (addr handle gap-buffer) <- get self, scalar-data
+  allocate data-ah
+  var data/eax: (addr gap-buffer) <- lookup *data-ah
+  initialize-gap-buffer data
+  # TODO: sometimes initialize box-data rather than scalar-data
+}
+
 ## some helpers for creating words. mostly for tests
 
 fn initialize-word-with _self: (addr word), s: (addr array byte) {