/[slime]/slime/swank-backend.lisp
ViewVC logotype

Diff of /slime/swank-backend.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.214 by heller, Thu Dec 1 22:34:41 2011 UTC revision 1.215 by heller, Sat Dec 10 12:34:09 2011 UTC
# Line 430  EXCEPT is a list of symbol names which s Line 430  EXCEPT is a list of symbol names which s
430    "Convert the (simple-array (unsigned-byte 8)) OCTETS to a string."    "Convert the (simple-array (unsigned-byte 8)) OCTETS to a string."
431    (default-utf8-to-string octets))    (default-utf8-to-string octets))
432    
433    ;;; Codepoint length
434    
435    ;; we don't need this anymore.
436    (definterface codepoint-length (string)
437      "Return the number of codepoints in STRING.
438    With some Lisps, like cmucl, LENGTH returns the number of UTF-16 code
439    units, but other Lisps return the number of codepoints. The slime
440    protocol wants string lengths in terms of codepoints."
441      (length string))
442    
443    
444  ;;;; TCP server  ;;;; TCP server
445    
# Line 1086  respective DEFSTRUCT definition, and so Line 1096  respective DEFSTRUCT definition, and so
1096    (make-error-location "FIND-DEFINITIONS is not yet implemented on ~    (make-error-location "FIND-DEFINITIONS is not yet implemented on ~
1097                          this implementation."))                          this implementation."))
1098    
   
1099  (definterface buffer-first-change (filename)  (definterface buffer-first-change (filename)
1100    "Called for effect the first time FILENAME's buffer is modified."    "Called for effect the first time FILENAME's buffer is modified.
1101    CMUCL/SBCL use this to cache the unmodified file and use the
1102    unmodified text to improve the precision of source locations."
1103    (declare (ignore filename))    (declare (ignore filename))
1104    nil)    nil)
1105    
# Line 1191  generic functions having names in the gi Line 1202  generic functions having names in the gi
1202  themselves, that is, their dispatch functions, are left alone.")  themselves, that is, their dispatch functions, are left alone.")
1203    
1204    
1205    ;;;; Trace
1206    
1207    (definterface toggle-trace (spec)
1208      "Toggle tracing of the function(s) given with SPEC.
1209    SPEC can be:
1210     (setf NAME)                            ; a setf function
1211     (:defmethod NAME QUALIFIER... (SPECIALIZER...)) ; a specific method
1212     (:defgeneric NAME)                     ; a generic function with all methods
1213     (:call CALLER CALLEE)                  ; trace calls from CALLER to CALLEE.
1214     (:labels TOPLEVEL LOCAL)
1215     (:flet TOPLEVEL LOCAL) ")
1216    
1217    
1218  ;;;; Inspector  ;;;; Inspector
1219    
1220  (defgeneric emacs-inspect (object)  (defgeneric emacs-inspect (object)
# Line 1293  have to be unique." Line 1317  have to be unique."
1317    (declare (ignore thread))    (declare (ignore thread))
1318    '())    '())
1319    
 (definterface make-lock (&key name)  
    "Make a lock for thread synchronization.  
 Only one thread may hold the lock (via CALL-WITH-LOCK-HELD) at a time  
 but that thread may hold it more than once."  
    (declare (ignore name))  
    :null-lock)  
   
 (definterface call-with-lock-held (lock function)  
    "Call FUNCTION with LOCK held, queueing if necessary."  
    (declare (ignore lock)  
             (type function function))  
    (funcall function))  
   
1320  (definterface current-thread ()  (definterface current-thread ()
1321    "Return the currently executing thread."    "Return the currently executing thread."
1322    0)    0)
# Line 1377  return nil. Line 1388  return nil.
1388    
1389  Return :interrupt if an interrupt occurs while waiting.")  Return :interrupt if an interrupt occurs while waiting.")
1390    
1391  (definterface toggle-trace (spec)  
1392    "Toggle tracing of the function(s) given with SPEC.  ;;;;  Locks
1393  SPEC can be:  
1394   (setf NAME)                            ; a setf function  ;; Please use locks only in swank-gray.lisp.  Locks are too low-level
1395   (:defmethod NAME QUALIFIER... (SPECIALIZER...)) ; a specific method  ;; for our taste.
1396   (:defgeneric NAME)                     ; a generic function with all methods  
1397   (:call CALLER CALLEE)                  ; trace calls from CALLER to CALLEE.  (definterface make-lock (&key name)
1398   (:labels TOPLEVEL LOCAL)     "Make a lock for thread synchronization.
1399   (:flet TOPLEVEL LOCAL) ")  Only one thread may hold the lock (via CALL-WITH-LOCK-HELD) at a time
1400    but that thread may hold it more than once."
1401       (declare (ignore name))
1402       :null-lock)
1403    
1404    (definterface call-with-lock-held (lock function)
1405       "Call FUNCTION with LOCK held, queueing if necessary."
1406       (declare (ignore lock)
1407                (type function function))
1408       (funcall function))
1409    
1410    ;; Same here: don't use this outside of swank-gray.lisp.
1411    (definterface call-with-io-timeout (function &key seconds)
1412      "Calls function with the specified IO timeout."
1413      (declare (ignore seconds))
1414      (funcall function))
1415    
1416    
1417  ;;;; Weak datastructures  ;;;; Weak datastructures
# Line 1460  RESTART-FUNCTION, if non-nil, should be Line 1486  RESTART-FUNCTION, if non-nil, should be
1486    "Request saving a heap image to the file FILENAME.    "Request saving a heap image to the file FILENAME.
1487  RESTART-FUNCTION, if non-nil, should be called when the image is loaded.  RESTART-FUNCTION, if non-nil, should be called when the image is loaded.
1488  COMPLETION-FUNCTION, if non-nil, should be called after saving the image.")  COMPLETION-FUNCTION, if non-nil, should be called after saving the image.")
   
 ;;; Codepoint length  
   
 (definterface codepoint-length (string)  
   "Return the number of codepoints in STRING.  
 With some Lisps, like cmucl, LENGTH returns the number of UTF-16 code  
 units, but other Lisps return the number of codepoints. The slime  
 protocol wants string lengths in terms of codepoints."  
   (length string))  
   
 ;;; Timeouts  
   
 (definterface call-with-io-timeout (function &key seconds)  
   "Calls function with the specified IO timeout."  
   (declare (ignore seconds))  
   (funcall function))  

Legend:
Removed from v.1.214  
changed lines
  Added in v.1.215

  ViewVC Help
Powered by ViewVC 1.1.5