diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-18 19:51:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-18 20:01:11 -0700 |
commit | 91b7b0be73b88c38e11e21501e813a6b7a048f45 (patch) | |
tree | 79b0a784a3c6ffa8d91ef7e18c429ea074a8f415 | |
parent | 837926751a5bc1abe60cb49e8b5243705c6591da (diff) | |
download | mu-91b7b0be73b88c38e11e21501e813a6b7a048f45.tar.gz |
shell: clean up trace for macroexpand
-rw-r--r-- | shell/evaluate.mu | 4 | ||||
-rw-r--r-- | shell/macroexpand.mu | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/shell/evaluate.mu b/shell/evaluate.mu index 5b58fc08..d4fee50e 100644 --- a/shell/evaluate.mu +++ b/shell/evaluate.mu @@ -1561,6 +1561,7 @@ fn evaluate-backquote _in-ah: (addr handle cell), _out-ah: (addr handle cell), e break-if-= return } + trace-lower trace var in-ah/esi: (addr handle cell) <- copy _in-ah var in/eax: (addr cell) <- lookup *in-ah { @@ -1603,6 +1604,7 @@ fn evaluate-backquote _in-ah: (addr handle cell), _out-ah: (addr handle cell), e debug-print ",", 3/fg, 0/bg evaluate rest-ah, _out-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number debug-print ",)", 3/fg, 0/bg + trace-higher trace return } # check for unquote-splice in in-left @@ -1661,6 +1663,7 @@ fn evaluate-backquote _in-ah: (addr handle cell), _out-ah: (addr handle cell), e # append result of in-right var in-right-ah/ecx: (addr handle cell) <- get in, right evaluate-backquote in-right-ah, out-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number + trace-higher trace return } debug-print "19", 4/fg, 0/bg @@ -1690,6 +1693,7 @@ fn evaluate-backquote _in-ah: (addr handle cell), _out-ah: (addr handle cell), e debug-print "`r(", 3/fg, 0/bg evaluate-backquote in-right-ah, out-right-ah, env-h, globals, trace, screen-cell, keyboard-cell, call-number debug-print "`r)", 3/fg, 0/bg + trace-higher trace } fn test-evaluate-backquote-list { diff --git a/shell/macroexpand.mu b/shell/macroexpand.mu index e7b0b470..70de1091 100644 --- a/shell/macroexpand.mu +++ b/shell/macroexpand.mu @@ -43,6 +43,7 @@ fn macroexpand-iter _expr-ah: (addr handle cell), globals: (addr global-table), trace trace, "mac", stream } # }}} + trace-lower trace # if expr is a non-pair, return var expr/eax: (addr cell) <- lookup *expr-ah { @@ -193,6 +194,7 @@ fn macroexpand-iter _expr-ah: (addr handle cell), globals: (addr global-table), # TODO: check car(macro-definition) is litfn #? turn-on-debug-print apply macro-definition-ah, rest-ah, expr-ah, globals, trace, 0/no-screen, 0/no-keyboard, 0/call-number + trace-higher trace return 1/true } # no macro found; process any macros within args @@ -213,6 +215,7 @@ fn macroexpand-iter _expr-ah: (addr handle cell), globals: (addr global-table), rest-ah <- get rest, right loop } + trace-higher trace return result } |