[slime-devel] Patch for CLISP with `readtable-case' set to :invert.

Lars Rune Nøstdal larsnostdal at gmail.com
Sun Nov 26 17:16:46 UTC 2006


Ok, I'm probably the only one using `readtable-case' set to :invert .. but
just in case, here is a patch with changes I had to do to get latest Slime
and CLISP-2.41 to start Slime. It's tested with SBCL-0.9.18.43 also:


cvs diff: Diffing .
Index: metering.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/metering.lisp,v
retrieving revision 1.4
diff -u -r1.4 metering.lisp
--- metering.lisp       1 Apr 2005 20:16:35 -0000       1.4
+++ metering.lisp       26 Nov 2006 17:13:54 -0000
@@ -359,17 +359,17 @@
 
 ;;; For CLtL2 compatible lisps
 
-(defpackage "MONITOR" (:nicknames "MON") (:use "COMMON-LISP")
-  (:export "*MONITORED-FUNCTIONS*"
-          "MONITOR" "MONITOR-ALL" "UNMONITOR" "MONITOR-FORM"
-          "WITH-MONITORING"
-          "RESET-MONITORING-INFO" "RESET-ALL-MONITORING"
-          "MONITORED"
-          "REPORT-MONITORING"
-          "DISPLAY-MONITORING-RESULTS"
-          "MONITORING-ENCAPSULATE" "MONITORING-UNENCAPSULATE"
-          "REPORT"))
-(in-package "MONITOR")
+(defpackage :monitor (:nicknames :mon) (:use :cl)
+  (:export :*monitored-functions*
+           :monitor :monitor-all :unmonitor :monitor-form
+           :with-monitoring
+           :reset-monitoring-info :reset-all-monitoring
+           :monitored
+           :report-monitoring
+           :display-monitoring-results
+           :monitoring-encapsulate :monitoring-unencapsulate
+           :report))
+(in-package :monitor)
 
 ;;; Warn user if they're loading the source instead of compiling it first.
 (eval-when (eval)
@@ -594,16 +594,16 @@
 ;;; ********************************
 ;;; Global Variables ***************
 ;;; ********************************
-(defvar *MONITOR-TIME-OVERHEAD* nil
+(defvar *monitor-time-overhead* nil
   "The amount of time an empty monitored function costs.")
-(defvar *MONITOR-CONS-OVERHEAD* nil
+(defvar *monitor-cons-overhead* nil
   "The amount of cons an empty monitored function costs.")
 
-(defvar *TOTAL-TIME* 0
+(defvar *total-time* 0
   "Total amount of time monitored so far.")
-(defvar *TOTAL-CONS* 0
+(defvar *total-cons* 0
   "Total amount of consing monitored so far.")
-(defvar *TOTAL-CALLS* 0
+(defvar *total-calls* 0
   "Total number of calls monitored so far.")
 (proclaim '(type time-type *total-time*))
 (proclaim '(type consing-type *total-cons*))
@@ -614,7 +614,7 @@
 ;;; ********************************
 ;;; Perhaps the SYMBOLP should be FBOUNDP? I.e., what about variables
 ;;; containing closures.
-(defmacro PLACE-FUNCTION (function-place)
+(defmacro place-function (function-place)
   "Return the function found at FUNCTION-PLACE. Evals FUNCTION-PLACE
 if it isn't a symbol, to allow monitoring of closures located in
 variables/arrays/structures."
@@ -628,7 +628,7 @@
            (symbol-function ,function-place)
            (eval ,function-place))))
 
-(defsetf PLACE-FUNCTION (function-place) (function)
+(defsetf place-function (function-place) (function)
   "Set the function in FUNCTION-PLACE to FUNCTION."
   (if (fboundp 'fdefinition)
       ;; If we're conforming to CLtL2, use fdefinition here.
@@ -656,7 +656,7 @@
        (eval '(setf ,function-place ',function))))
 |#
 
-(defun PLACE-FBOUNDP (function-place)
+(defun place-fboundp (function-place)
   "Test to see if FUNCTION-PLACE is a function."
   ;; probably should be
   #|(or (and (symbolp function-place)(fboundp function-place))
@@ -665,7 +665,7 @@
       (fboundp function-place)
       (functionp (place-function function-place))))
 
-(defun PLACE-MACROP (function-place)
+(defun place-macrop (function-place)
   "Test to see if FUNCTION-PLACE is a macro."
   (when (symbolp function-place)
     (macro-function function-place)))
@@ -705,7 +705,7 @@
 (defsetf get-monitor-info (name) (info)
   `(setf (gethash ,name *monitor*) ,info))
 
-(defun MONITORED (function-place)
+(defun monitored (function-place)
   "Test to see if a FUNCTION-PLACE is monitored."
   (and (place-fboundp function-place)   ; this line necessary?
        (get-monitor-info function-place)))
@@ -933,7 +933,7 @@
 ;;; ********************************
 ;;; Main Monitoring Functions ******
 ;;; ********************************
-(defmacro MONITOR (&rest names)
+(defmacro monitor (&rest names)
   "Monitor the named functions. As in TRACE, the names are not evaluated.
    If a function is already monitored, then unmonitor and remonitor (useful
    to notice function redefinition). If a name is undefined, give a warning
@@ -943,13 +943,13 @@
      ,@(mapcar #'(lambda (name) `(monitoring-encapsulate ',name)) names)
      *monitored-functions*))
 
-(defmacro UNMONITOR (&rest names)
+(defmacro unmonitor (&rest names)
   "Remove the monitoring on the named functions.
    Names defaults to the list of all currently monitored functions."
   `(dolist (name ,(if names `',names '*monitored-functions*) (values))
      (monitoring-unencapsulate name)))
 
-(defun MONITOR-ALL (&optional (package *package*))
+(defun monitor-all (&optional (package *package*))
   "Monitor all functions in the specified package."
   (let ((package (if (packagep package)
                     package
@@ -958,7 +958,7 @@
       (when (eq (symbol-package symbol) package)
         (monitoring-encapsulate symbol)))))
 
-(defmacro MONITOR-FORM (form
+(defmacro monitor-form (form
                         &optional (nested :exclusive) (threshold 0.01)
                         (key :percent-time))
   "Monitor the execution of all functions in the current package
@@ -973,7 +973,7 @@
            (report-monitoring :all ,nested ,threshold ,key :ignore-no-calls)))
      (unmonitor)))
 
-(defmacro WITH-MONITORING ((&rest functions)
+(defmacro with-monitoring ((&rest functions)
                            (&optional (nested :exclusive)
                                       (threshold 0.01)
                                       (key :percent-time))
@@ -995,12 +995,12 @@
   "Number of iterations over which the timing overhead is averaged.")
 
 ;;; Perhaps this should return something to frustrate clever compilers.
-(defun STUB-FUNCTION (x)
+(defun stub-function (x)
   (declare (ignore x))
   nil)
 (proclaim '(notinline stub-function))
 
-(defun SET-MONITOR-OVERHEAD ()
+(defun set-monitor-overhead ()
   "Determines the average overhead of monitoring by monitoring the execution
 of an empty function many times."
   (setq *monitor-time-overhead* 0
cvs diff: Diffing doc


-- 
Lars Rune Nøstdal
http://lars.nostdal.org/





More information about the slime-devel mailing list