about summary refs log tree commit diff stats
path: root/shell/evaluate.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-08 15:06:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-08 15:06:08 -0700
commit67aeff89348d9588926b4cbd2b1feadc7d607bfa (patch)
treedca16212b4f66a9f94138b35cffeb6afa6b5bc9a /shell/evaluate.mu
parenta7008328cb3aa2b6182bd50ee996082bdac2ec43 (diff)
downloadmu-67aeff89348d9588926b4cbd2b1feadc7d607bfa.tar.gz
.
I wrote a comment about how some code was not covered by tests, and then
promptly forgot what it was for. This is why we need tests.

Now the hack is gone.
Diffstat (limited to 'shell/evaluate.mu')
-rw-r--r--shell/evaluate.mu10
1 files changed, 3 insertions, 7 deletions
diff --git a/shell/evaluate.mu b/shell/evaluate.mu
index 3de0f1eb..e4034f95 100644
--- a/shell/evaluate.mu
+++ b/shell/evaluate.mu
@@ -9,13 +9,9 @@ fn evaluate _in-ah: (addr handle cell), _out-ah: (addr handle cell), env-h: (han
   # stack overflow?   # disable when enabling Really-debug-print
   check-stack
   {
-    var screen-cell/eax: (addr handle cell) <- copy screen-cell
-    compare screen-cell, 0
-    break-if-=
-    var screen-cell-addr/eax: (addr cell) <- lookup *screen-cell
-    compare screen-cell-addr, 0
-    break-if-=
-    # if screen-cell exists, we're probably not in a test
+    var running-tests?/eax: boolean <- running-tests?
+    compare running-tests?, 0/false
+    break-if-!=
     show-stack-state
   }
   # show intermediate progress on screen if necessary