summary refs log tree commit diff
path: root/legacy/bigloo/debug.sch
diff options
context:
space:
mode:
authorLudovic Court`es2005-11-02 10:08:38 +0000
committerLudovic Court`es2005-11-02 10:08:38 +0000
commitb76d5e1b252967521f210eac10ddbf089dde8c6a (patch)
tree00fc81c51256991c04799d79a749bbdd5b9fad30 /legacy/bigloo/debug.sch
parentba63b8d4780428d9f63f6ace7f49361b77401112 (diff)
parentf553cb65b157b6df9563cefa593902d59301461b (diff)
downloadskribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.gz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.lz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.zip
Cleaned up the source tree and the installation process.
Patches applied:

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-6
   Cosmetic changes.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-7
   Removed useless files, integrated packages.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-8
   Removed useless files, integrated packages.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-9
   Moved the STkLos and Bigloo code to `legacy'.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-10
   Installed Autoconf/Automake machinery.  Fixed a few things.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-11
   Changes related to source-highlighting and to the manual.


git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-10
Diffstat (limited to 'legacy/bigloo/debug.sch')
-rw-r--r--legacy/bigloo/debug.sch54
1 files changed, 54 insertions, 0 deletions
diff --git a/legacy/bigloo/debug.sch b/legacy/bigloo/debug.sch
new file mode 100644
index 0000000..9b53c84
--- /dev/null
+++ b/legacy/bigloo/debug.sch
@@ -0,0 +1,54 @@
+;*=====================================================================*/
+;*    serrano/prgm/project/skribe/src/bigloo/debug.sch                 */
+;*    -------------------------------------------------------------    */
+;*    Author      :  Manuel Serrano                                    */
+;*    Creation    :  Thu May 29 06:46:33 2003                          */
+;*    Last change :  Tue Nov  2 14:31:45 2004 (serrano)                */
+;*    Copyright   :  2003-04 Manuel Serrano                            */
+;*    -------------------------------------------------------------    */
+;*    Simple debug facilities                                          */
+;*=====================================================================*/
+
+;*---------------------------------------------------------------------*/
+;*    directives                                                       */
+;*---------------------------------------------------------------------*/
+(directives
+   (import skribe_debug))
+
+;*---------------------------------------------------------------------*/
+;*    when-debug ...                                                   */
+;*---------------------------------------------------------------------*/
+(define-macro (when-debug level . exp)
+   (if (and (number? *compiler-debug*) (> *compiler-debug* 0))
+       `(if (>= *skribe-debug* ,level) (begin ,@exp))
+       #unspecified))
+
+;*---------------------------------------------------------------------*/
+;*    with-debug ...                                                   */
+;*---------------------------------------------------------------------*/
+(define-macro (with-debug level lbl . arg*)
+   (if (and (number? *compiler-debug*) (> *compiler-debug* 0))
+       `(%with-debug ,level ,lbl (lambda () (begin ,@arg*)))
+       `(begin ,@arg*)))
+
+;*---------------------------------------------------------------------*/
+;*    with-push-trace ...                                              */
+;*---------------------------------------------------------------------*/
+(define-macro (with-push-trace lbl . arg*)
+   (if (and (number? *compiler-debug*) (> *compiler-debug* 0))
+       (let ((r (gensym)))
+	  `(let ()
+	      (c-push-trace ,lbl)
+	      (let ((,r ,@arg*))
+		 (c-pop-trace)
+		 ,r)))
+       `(begin ,@arg*)))
+
+;*---------------------------------------------------------------------*/
+;*    debug-item ...                                                   */
+;*---------------------------------------------------------------------*/
+(define-expander debug-item
+   (lambda (x e)
+      (if (and (number? *compiler-debug*) (> *compiler-debug* 0))
+	  `(debug-item ,@(map (lambda (x) (e x e)) (cdr x)))
+	  #unspecified)))