From ad46997f9559b12b5ef7b6fd88f881651a1cc0ca Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 18 Apr 2021 23:10:01 -0700 Subject: . --- shell/print.mu | 7 +++++++ 1 file changed, 7 insertions(+) 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 " -- cgit 1.4.1-2-gfad0