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-19 21:44:48 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-19 21:44:48 -0700
commit8e4b4f2013b3f347e84398c70eabab60f6edd625 (patch)
treebf0e5f947ea43dbca51998bd4a27a05ffd8d161b /apps/tile/word.mu
parent72e8240a23da7b82893d6b4e7ed3337ca0827049 (diff)
downloadmu-8e4b4f2013b3f347e84398c70eabab60f6edd625.tar.gz
6807 - tile: render intermediate stack state
Diffstat (limited to 'apps/tile/word.mu')
-rw-r--r--apps/tile/word.mu6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/tile/word.mu b/apps/tile/word.mu
index e1c5e22d..9e683985 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -116,3 +116,9 @@ fn append-word _self-ah: (addr handle word) {
   var prev-ah/eax: (addr handle word) <- get next, prev
   copy-handle *self-ah, prev-ah
 }
+
+fn emit-word _self: (addr word), out: (addr stream byte) {
+  var self/esi: (addr word) <- copy _self
+  var data/eax: (addr gap-buffer) <- get self, data
+  emit-gap-buffer data, out
+}