diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-18 23:10:01 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-18 23:10:01 -0700 |
commit | ad46997f9559b12b5ef7b6fd88f881651a1cc0ca (patch) | |
tree | bb2669f17bc046b14c355e8d4a92399b5a7283e4 | |
parent | 2f10bc73023234aa46c71cb36a075cb5fe1bbf1a (diff) | |
download | mu-ad46997f9559b12b5ef7b6fd88f881651a1cc0ca.tar.gz |
.
-rw-r--r-- | shell/print.mu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/print.mu b/shell/print.mu index c89e301f..7d6b8eb3 100644 --- a/shell/print.mu +++ b/shell/print.mu @@ -1,4 +1,5 @@ fn print-cell _in: (addr handle cell), out: (addr stream byte), trace: (addr trace) { + check-stack trace-text trace, "print", "print" trace-lower trace var in/eax: (addr handle cell) <- copy _in @@ -99,6 +100,8 @@ fn print-symbol _in: (addr cell), out: (addr stream byte), trace: (addr trace) { rewind-stream data write-stream out, data # trace + compare trace, 0 + break-if-= rewind-stream data var stream-storage: (stream byte 0x40) var stream/ecx: (addr stream byte) <- address stream-storage @@ -118,6 +121,8 @@ fn print-stream _in: (addr cell), out: (addr stream byte), trace: (addr trace) { write-stream out, data write out, "]" # trace + compare trace, 0 + break-if-= rewind-stream data var stream-storage: (stream byte 0x40) var stream/ecx: (addr stream byte) <- address stream-storage @@ -131,6 +136,8 @@ fn print-number _in: (addr cell), out: (addr stream byte), trace: (addr trace) { var val/eax: (addr float) <- get in, number-data write-float-decimal-approximate out, *val, 3/precision # trace + compare trace, 0 + break-if-= var stream-storage: (stream byte 0x40) var stream/ecx: (addr stream byte) <- address stream-storage write stream, "=> number " |