about summary refs log tree commit diff stats
path: root/apps/tile/value-stack.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tile/value-stack.mu')
-rw-r--r--apps/tile/value-stack.mu13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/tile/value-stack.mu b/apps/tile/value-stack.mu
index dbe25b74..2eae94d3 100644
--- a/apps/tile/value-stack.mu
+++ b/apps/tile/value-stack.mu
@@ -176,6 +176,19 @@ fn value-stack-max-width _self: (addr value-stack) -> result/eax: int {
       break-if-<=
       copy-to out, w
     }
+    {
+      compare *type, 3  # file handle
+      break-if-!=
+      var f-ah/eax: (addr handle buffered-file) <- get g, file-data
+      var f/eax: (addr buffered-file) <- lookup *f-ah
+      compare f, 0
+      break-if-=
+      # TODO
+      var w/eax: int <- copy 4
+      compare w, out
+      break-if-<=
+      copy-to out, w
+    }
     i <- increment
     loop
   }