about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apps/tile/data.mu10
-rw-r--r--apps/tile/environment.mu2
-rw-r--r--apps/tile/rpn.mu2
3 files changed, 12 insertions, 2 deletions
diff --git a/apps/tile/data.mu b/apps/tile/data.mu
index 44d9b2d6..bdd42ce5 100644
--- a/apps/tile/data.mu
+++ b/apps/tile/data.mu
@@ -40,6 +40,16 @@ type value {
   box-data: (handle line)
 }
 
+type bind {
+  key: (handle array byte)
+  value: value
+}
+
+type table {
+  data: (handle array bind)
+  next: (handle table)
+}
+
 #? type result {
 #?   data: (handle value-stack)
 #?   error: (handle array byte)  # single error message for now
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 73d97de5..a52db8b8 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -238,7 +238,7 @@ fn render-column screen: (addr screen), defs: (addr function), scratch: (addr li
     var stack: int-stack
     var stack-addr/edi: (addr int-stack) <- address stack
     initialize-int-stack stack-addr, 0x10  # max-words
-    evaluate defs, scratch, final-word, stack-addr
+    evaluate defs, 0, scratch, final-word, stack-addr
     # render stack
     var curr-row/edx: int <- copy top-row
     curr-row <- add 3  # stack-margin-top
diff --git a/apps/tile/rpn.mu b/apps/tile/rpn.mu
index 79339918..4f9a926c 100644
--- a/apps/tile/rpn.mu
+++ b/apps/tile/rpn.mu
@@ -1,4 +1,4 @@
-fn evaluate defs: (addr function), scratch: (addr line), end: (addr word), out: (addr int-stack) {
+fn evaluate defs: (addr function), bindings: (addr table), scratch: (addr line), end: (addr word), out: (addr int-stack) {
   var line/eax: (addr line) <- copy scratch
   var word-ah/eax: (addr handle word) <- get line, data
   var curr/eax: (addr word) <- lookup *word-ah