debugging.scm 681 B

12345678910111213141516171819202122232425262728293031
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. ;; Debugging code
  3. ;; To activate/deactivate it, the flag 'debug-mode?' must be set.
  4. ;; To see all the debugging infos:
  5. ;; set the the flag 'debug-mode?' to #t
  6. ;; and remake the GC
  7. ;; make compile-twospace-gc or make compile-bibop-gc
  8. ;; make scheme48vm
  9. ;; make
  10. ;; and ./go
  11. ;; Debugging
  12. (define debug-mode? #f)
  13. ;; expr is a string
  14. (define (debug expr)
  15. (if debug-mode? (display-message expr)))
  16. ;; expr is an integer
  17. (define (debug-int expr)
  18. (if debug-mode? (display-integer expr)))
  19. ;;just a line
  20. (define (debug-line)
  21. (if debug-mode?
  22. (display-message "----------------------")))