;; 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
(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
)
)
;;; 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)
(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)))))))