about summary refs log tree commit diff stats
path: root/apps/tile/environment.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-13 00:05:05 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-13 00:05:05 -0700
commitaf52cb8d1fe6b523cd733c699f72508509be45cc (patch)
treedeeb6974dceb8eb42585e49bff2a70275ef503d1 /apps/tile/environment.mu
parent54fd7d7a99374945158277193ff2d0976cb0d756 (diff)
downloadmu-af52cb8d1fe6b523cd733c699f72508509be45cc.tar.gz
7015 - bugfix in column width computation
I just got bitten by variable shadowing! It's a lot less theoretical concern
now.
Diffstat (limited to 'apps/tile/environment.mu')
-rw-r--r--apps/tile/environment.mu10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 6e865c38..b0ed4605 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -748,14 +748,11 @@ fn render-line screen: (addr screen), functions: (addr handle function), binding
 #
 # Return the farthest column written.
 fn render-column screen: (addr screen), functions: (addr handle function), bindings: (addr table), scratch: (addr line), final-word: (addr word), top-row: int, left-col: int -> right-col/ecx: int {
-  var max-width/ecx: int <- copy 0
+  var max-width/esi: int <- copy 0
   {
     # indent stack
     var indented-col/ebx: int <- copy left-col
     indented-col <- add 1  # margin-right - 2 for padding spaces
-#?     print-string 0, "rendering stack from "
-#?     print-int32-decimal 0, indented-col
-#?     print-string 0, "\n"
     # compute stack
     var stack: value-stack
     var stack-addr/edi: (addr value-stack) <- address stack
@@ -765,14 +762,11 @@ fn render-column screen: (addr screen), functions: (addr handle function), bindi
     var curr-row/edx: int <- copy top-row
     curr-row <- add 3  # stack-margin-top
     var _max-width/eax: int <- value-stack-max-width stack-addr
-    var max-width/esi: int <- copy _max-width
+    max-width <- copy _max-width
     var i/eax: int <- value-stack-length stack-addr
     {
       compare i, 0
       break-if-<=
-#?       print-string 0, "rendering stack row from "
-#?       print-int32-decimal 0, indented-col
-#?       print-string 0, "\n"
       move-cursor screen, curr-row, indented-col
       {
         var val/eax: int <- pop-int-from-value-stack stack-addr