diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-17 23:40:49 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-17 23:52:52 -0700 |
commit | 97df52bf2fadf41fe73745c99730e0838881b0df (patch) | |
tree | 0915a0360a44faedcedc7d90f866a6b91685e053 /shell/evaluate.mu | |
parent | c11ea74442e20070e1453e7e1ee27b7870407023 (diff) | |
download | mu-97df52bf2fadf41fe73745c99730e0838881b0df.tar.gz |
shell: ctrl-r runs on real screen without a trace
We run out of memory fairly early in the course of drawing a chessboard on the whole screen.
Diffstat (limited to 'shell/evaluate.mu')
-rw-r--r-- | shell/evaluate.mu | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/shell/evaluate.mu b/shell/evaluate.mu index 580a9ac3..fa8610c7 100644 --- a/shell/evaluate.mu +++ b/shell/evaluate.mu @@ -66,6 +66,22 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel trace-higher trace return } + compare *in-type, 5/screen + { + break-if-!= + trace-text trace, "eval", "screen" + copy-object _in, out + trace-higher trace + return + } + compare *in-type, 6/keyboard + { + break-if-!= + trace-text trace, "eval", "keyboard" + copy-object _in, out + trace-higher trace + return + } # in-addr is a syntax tree $evaluate:anonymous-function: { # trees starting with "fn" are anonymous functions @@ -225,8 +241,6 @@ fn evaluate _in: (addr handle cell), out: (addr handle cell), env-h: (handle cel var evaluated-list/eax: (addr cell) <- lookup *evaluated-list-ah var function-ah/ecx: (addr handle cell) <- get evaluated-list, left var args-ah/edx: (addr handle cell) <- get evaluated-list, right -#? set-cursor-position 0/screen, 0, 0 -#? draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "a", 7/fg, 0/bg apply function-ah, args-ah, out, globals, trace, screen-cell, keyboard-cell trace-higher trace # trace "=> " out {{{ |