Remove explicit "debug" level.
authorJean-Claude Beaudoin <jean.claude.beaudoin@gmail.com>
Sun, 13 Jan 2013 04:21:54 +0000 (23:21 -0500)
committerJean-Claude Beaudoin <jean.claude.beaudoin@gmail.com>
Sun, 13 Jan 2013 04:21:54 +0000 (23:21 -0500)
contrib/slime/contrib/swank-fuzzy.lisp
contrib/slime/swank-backend.lisp
contrib/slime/swank-loader.lisp
contrib/slime/swank-mkcl.lisp
contrib/slime/swank-rpc.lisp
contrib/slime/swank.lisp

index 97ed8c5..5ecf466 100644 (file)
@@ -621,8 +621,7 @@ capitalized, while the rest of the string will be lower-case."
   "Given a list of completion objects such as on returned by
 FUZZY-COMPLETION-SET, format the list into user-readable output
 for interactive debugging purpose."
-  (let ((max-len 
-         (loop for winner in winners maximizing (length (first winner)))))
+  (let ((max-len (loop for winner in winners maximizing (length (first winner)))))
     (loop for (sym score result) in winners do
           (format t "~&~VA  score ~8,2F  ~A"
                   max-len (highlight-completion result sym) score result))))
index 39e921b..58ac3af 100644 (file)
@@ -10,7 +10,7 @@
 ;;; separately for each Lisp. Each is declared as a generic function
 ;;; for which swank-<implementation>.lisp provides methods.
 
-(declaim (optimize (debug 3) (safety 3) (speed 2)))
+;;(declaim (optimize (debug 3) (safety 3) (speed 2)))
 
 (defpackage :swank-backend
   (:use :common-lisp)
index fb63a4e..7ea5e94 100644 (file)
@@ -178,8 +178,14 @@ If LOAD is true, load the fasl file."
               ;; everything after this too.
               (setq needs-recompile t)
               (setq state :compile)
-              ;;(proclaim '(optimize (debug 3) (safety 3) (speed 2))) ;; debug
-              (let (;;(compiler::*c-file* t) (compiler::*h-file* t) (compiler::*data-file* t) ;; help debug MKCL.
+              ;; (format t "~&About to call compile-file with these settings: ~
+              ;;              speed = ~S, safety = ~S, space = ~S, debug = ~S.~%"
+              ;;         compiler::*speed* compiler::*safety* compiler::*space* compiler::*debug*)
+              ;;(proclaim '(optimize (debug 3) (safety 3) (speed 2))) ;; debug JCB
+              (let (;;(compiler::*c-file* t) (compiler::*h-file* t) (compiler::*data-file* t) ;; help debug MKCL. JCB
+                    ;;(compiler::*trace-cc* t) ;; show gcc activity
+                    ;;(*compile-verbose* t)
+                    ;;(*compile-print* t)
                     )
                 (or (compile-file src :output-file dest :print nil :verbose t)
                     ;; An implementation may not necessarily signal a
index 5b59b5a..ed529c0 100644 (file)
 
 (in-package :swank-backend)
 
-(declaim (optimize (debug 3)))
+;;(declaim (optimize (debug 3)))
 
 (defvar *tmp*)
 
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (:compile-toplevel :load-toplevel)
   (if (find-package :gray)
       (import-from :gray *gray-stream-symbols* :swank-backend)
     (import-from :ext *gray-stream-symbols* :swank-backend))
     )
   ) ;; eval-when
 
-
+\f
 ;;; UTF8
 
 (defimplementation string-to-utf8 (string)
-  ;;(sb-ext:string-to-octets string :external-format :utf8)
-  (mkcl:octets (si:utf-8 string))
-  )
+  (mkcl:octets (si:utf-8 string)))
 
 (defimplementation utf8-to-string (octets)
-  ;;(sb-ext:octets-to-string octets :external-format :utf8)
-  (string (si:utf-8 octets))
-  )
+  (string (si:utf-8 octets)))
 
 
 ;;;; TCP Server
 
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (:compile-toplevel :load-toplevel)
+  ;; At compile-time we need access to the sb-bsd-sockets package for the
+  ;; the following code to be read properly.
+  ;; It is a bit a shame we have to load the entire module to get that.
   (require 'sockets))
 
 
   (si:compiled-function-name f)
   )
 
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (:compile-toplevel :load-toplevel)
+  ;; At compile-time we need access to the walker package for the
+  ;; the following code to be read properly.
+  ;; It is a bit a shame we have to load the entire module to get that.
   (require 'walker))
 
 (defimplementation macroexpand-all (form)
 
 ;;; Debugging
 
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (:compile-toplevel :load-toplevel)
   (import
    '(si::*break-env*
      si::*ihs-top*
 ;;;; Profiling
 
 
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (:compile-toplevel :load-toplevel)
+  ;; At compile-time we need access to the profile package for the
+  ;; the following code to be read properly.
+  ;; It is a bit a shame we have to load the entire module to get that.
   (require 'profile))
 
 
        ;;(format t "~&: ~S~%" mt:*thread*) (finish-output)
        (handler-case
         (setq got-one (mt:semaphore-wait (mailbox.semaphore mbox) 2))
-        ;;(sleep 0.2)
         (condition (condition)
-           (format t "~&Something went bad with semaphore-wait ~A~%" condition)
+           (format t "~&In (swank-mkcl) receive-if: Something went bad with semaphore-wait ~A~%" condition)
            (finish-output)
-           ;;(break)
            nil
            )
         )
 
        ;;(format t "/ ~S~%" mt:*thread*) (finish-output)
        (when (eq timeout t) (return (values nil t)))
-       ;; (handler-case
-;;            (setq got-one (mt:semaphore-wait (mailbox.semaphore mbox) 2))
-;;            ;;(sleep 0.2)
-;;          (condition (condition)
-;;            (format t "~&Something went bad with semaphore-wait ~A~%" condition) (finish-output)
-;;            ;;(break)
-;;            nil
-;;            )
-;;          )
 ;;        (unless got-one
-;;          (format t "~&semaphore-wait timed out!~%"))
-       ;;(format t "~&= ~S~%" mt:*thread*) (finish-output)
+;;          (format t "~&In (swank-mkcl) receive-if: semaphore-wait timed out!~%"))
        )
     )
     (condition (condition)
-      (format t "~&Error in receive-if: ~S~%" condition) (finish-output)
+      (format t "~&Error in (swank-mkcl) receive-if: ~S, ~A~%" condition condition) (finish-output)
       nil
       )
     )
index 3e6507e..0858a15 100644 (file)
@@ -8,7 +8,7 @@
 ;;; are disclaimed.
 ;;;
 
-(declaim (optimize (debug 3) (safety 3) (speed 2)))
+;;(declaim (optimize (debug 3) (safety 3) (speed 2)))
 
 (defpackage #:swank-rpc
   (:use :cl)
index d03bcbe..9f7f0c2 100644 (file)
@@ -10,7 +10,7 @@
 ;;; them separately for each Lisp implementation. These extensions are
 ;;; available to us here via the `SWANK-BACKEND' package.
 
-(declaim (optimize (debug 3) (safety 3) (speed 2)))
+;;(declaim (optimize (debug 3) (safety 3) (speed 2)))
 
 (defpackage :swank
   (:use :cl :swank-backend :swank-match :swank-rpc)
@@ -2440,13 +2440,19 @@ Record compiler notes signalled as `compiler-condition's."
      (lambda ()
        (let ((pathname (filename-to-pathname filename))
              (*compile-print* nil) (*compile-verbose* t))
+         ;;(proclaim '(optimize (debug 3) (safety 3) (speed 2))) ;; debug JCB
          (multiple-value-bind (output-pathname warnings? failure?)
-             (swank-compile-file pathname
-                                 (fasl-pathname pathname options)
-                                 nil
-                                 (or (guess-external-format pathname)
-                                     :default)
-                                 :policy policy)
+             (let (;;(compiler::*c-file* t) (compiler::*h-file* t) (compiler::*data-file* t) ;; help debug MKCL. JCB
+                   ;;(compiler::*trace-cc* t) ;; show gcc activity
+                   ;;(*compile-verbose* t)
+                   ;;(*compile-print* t)
+                   )
+               (swank-compile-file pathname
+                                   (fasl-pathname pathname options)
+                                   nil
+                                   (or (guess-external-format pathname)
+                                       :default)
+                                   :policy policy))
            (declare (ignore warnings?))
            (values (not failure?) load-p output-pathname)))))))