/[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.94 by heller, Sun Nov 20 23:25:38 2005 UTC revision 1.191 by trittweiler, Wed Jan 6 14:13:48 2010 UTC
# Line 12  Line 12 
12    
13  (defpackage :swank-backend  (defpackage :swank-backend
14    (:use :common-lisp)    (:use :common-lisp)
15    (:export #:sldb-condition    (:export #:*debug-swank-backend*
16             #:original-condition             #:sldb-condition
17             #:compiler-condition             #:compiler-condition
18               #:original-condition
19             #:message             #:message
20             #:short-message             #:source-context
21             #:condition             #:condition
22             #:severity             #:severity
23               #:with-compilation-hooks
24             #:location             #:location
25             #:location-p             #:location-p
26             #:location-buffer             #:location-buffer
# Line 29  Line 31 
31             #:quit-lisp             #:quit-lisp
32             #:references             #:references
33             #:unbound-slot-filler             #:unbound-slot-filler
34               #:declaration-arglist
35               #:type-specifier-arglist
36               #:with-struct
37               ;; interrupt macro for the backend
38               #:*pending-slime-interrupts*
39               #:check-slime-interrupts
40               #:*interrupt-queued-handler*
41             ;; inspector related symbols             ;; inspector related symbols
42             #:inspector             #:emacs-inspect
            #:inspect-for-emacs  
            #:raw-inspection  
            #:fancy-inspection  
43             #:label-value-line             #:label-value-line
44             #:label-value-line*             #:label-value-line*
45             ))             #:with-symbol))
46    
47  (defpackage :swank-mop  (defpackage :swank-mop
48    (:use)    (:use)
# Line 84  Line 90 
90     #:slot-definition-type     #:slot-definition-type
91     #:slot-definition-readers     #:slot-definition-readers
92     #:slot-definition-writers     #:slot-definition-writers
93       #:slot-boundp-using-class
94       #:slot-value-using-class
95       #:slot-makunbound-using-class
96     ;; generic function protocol     ;; generic function protocol
97     #:compute-applicable-methods-using-classes     #:compute-applicable-methods-using-classes
98     #:finalize-inheritance))     #:finalize-inheritance))
# Line 93  Line 102 
102    
103  ;;;; Metacode  ;;;; Metacode
104    
105    (defparameter *debug-swank-backend* nil
106      "If this is true, backends should not catch errors but enter the
107    debugger where appropriate. Also, they should not perform backtrace
108    magic but really show every frame including SWANK related ones.")
109    
110  (defparameter *interface-functions* '()  (defparameter *interface-functions* '()
111    "The names of all interface functions.")    "The names of all interface functions.")
112    
# Line 102  DEFINTERFACE adds to this list and DEFIM Line 116  DEFINTERFACE adds to this list and DEFIM
116    
117  (defmacro definterface (name args documentation &rest default-body)  (defmacro definterface (name args documentation &rest default-body)
118    "Define an interface function for the backend to implement.    "Define an interface function for the backend to implement.
119  A generic function is defined with NAME, ARGS, and DOCUMENTATION.  A function is defined with NAME, ARGS, and DOCUMENTATION.  This
120    function first looks for a function to call in NAME's property list
121  If a DEFAULT-BODY is supplied then NO-APPLICABLE-METHOD is specialized  that is indicated by 'IMPLEMENTATION; failing that, it looks for a
122  to execute the body if the backend doesn't provide a specific  function indicated by 'DEFAULT. If neither is present, an error is
123  implementation.  signaled.
124    
125    If a DEFAULT-BODY is supplied, then a function with the same body and
126    ARGS will be added to NAME's property list as the property indicated
127    by 'DEFAULT.
128    
129  Backends implement these functions using DEFIMPLEMENTATION."  Backends implement these functions using DEFIMPLEMENTATION."
130    (check-type documentation string "a documentation string")    (check-type documentation string "a documentation string")
131    (flet ((gen-default-impl ()    (assert (every #'symbolp args) ()
132             `(defmethod ,name ,args ,@default-body)))            "Complex lambda-list not supported: ~S ~S" name args)
133      `(progn (defgeneric ,name ,args (:documentation ,documentation))    (labels ((gen-default-impl ()
134              (pushnew ',name *interface-functions*)               `(setf (get ',name 'default) (lambda ,args ,@default-body)))
135              ,(if (null default-body)             (args-as-list (args)
136                   `(pushnew ',name *unimplemented-interfaces*)               (destructuring-bind (req opt key rest) (parse-lambda-list args)
137                   (gen-default-impl))                 `(,@req ,@opt
138              ;; see <http://www.franz.com/support/documentation/6.2/doc/pages/variables/compiler/s_cltl1-compile-file-toplevel-compatibility-p_s.htm>                         ,@(loop for k in key append `(,(kw k) ,k))
139              (eval-when (:compile-toplevel :load-toplevel :execute)                         ,@(or rest '(())))))
140                (export ',name :swank-backend))             (parse-lambda-list (args)
141              ',name)))               (parse args '(&optional &key &rest)
142                        (make-array 4 :initial-element nil)))
143               (parse (args keywords vars)
144                 (cond ((null args)
145                        (reverse (map 'list #'reverse vars)))
146                       ((member (car args) keywords)
147                        (parse (cdr args) (cdr (member (car args) keywords)) vars))
148                       (t (push (car args) (aref vars (length keywords)))
149                          (parse (cdr args) keywords vars))))
150               (kw (s) (intern (string s) :keyword)))
151        `(progn
152           (defun ,name ,args
153             ,documentation
154             (let ((f (or (get ',name 'implementation)
155                          (get ',name 'default))))
156               (cond (f (apply f ,@(args-as-list args)))
157                     (t (error "~S not implemented" ',name)))))
158           (pushnew ',name *interface-functions*)
159           ,(if (null default-body)
160                `(pushnew ',name *unimplemented-interfaces*)
161                (gen-default-impl))
162           ;; see <http://www.franz.com/support/documentation/6.2/doc/pages/variables/compiler/s_cltl1-compile-file-toplevel-compatibility-p_s.htm>
163           (eval-when (:compile-toplevel :load-toplevel :execute)
164             (export ',name :swank-backend))
165           ',name)))
166    
167  (defmacro defimplementation (name args &body body)  (defmacro defimplementation (name args &body body)
168    `(progn (defmethod ,name ,args ,@body)    (assert (every #'symbolp args) ()
169            (if (member ',name *interface-functions*)            "Complex lambda-list not supported: ~S ~S" name args)
170                (setq *unimplemented-interfaces*    `(progn
171                      (remove ',name *unimplemented-interfaces*))       (setf (get ',name 'implementation) (lambda ,args ,@body))
172                (warn "DEFIMPLEMENTATION of undefined interface (~S)" ',name))       (if (member ',name *interface-functions*)
173            ',name))           (setq *unimplemented-interfaces*
174                   (remove ',name *unimplemented-interfaces*))
175             (warn "DEFIMPLEMENTATION of undefined interface (~S)" ',name))
176         ',name))
177    
178  (defun warn-unimplemented-interfaces ()  (defun warn-unimplemented-interfaces ()
179    "Warn the user about unimplemented backend features.    "Warn the user about unimplemented backend features.
180  The portable code calls this function at startup."  The portable code calls this function at startup."
181    (warn "These Swank interfaces are unimplemented:~% ~A"    (let ((*print-pretty* t))
182          (sort (copy-list *unimplemented-interfaces*) #'string<)))      (warn "These Swank interfaces are unimplemented:~% ~:<~{~A~^ ~:_~}~:>"
183              (list (sort (copy-list *unimplemented-interfaces*) #'string<)))))
184    
185  (defun import-to-swank-mop (symbol-list)  (defun import-to-swank-mop (symbol-list)
186    (dolist (sym symbol-list)    (dolist (sym symbol-list)
# Line 158  EXCEPT is a list of symbol names which s Line 204  EXCEPT is a list of symbol names which s
204  (defvar *gray-stream-symbols*  (defvar *gray-stream-symbols*
205    '(:fundamental-character-output-stream    '(:fundamental-character-output-stream
206      :stream-write-char      :stream-write-char
207        :stream-write-string
208      :stream-fresh-line      :stream-fresh-line
209      :stream-force-output      :stream-force-output
210      :stream-finish-output      :stream-finish-output
211      :fundamental-character-input-stream      :fundamental-character-input-stream
212      :stream-read-char      :stream-read-char
213        :stream-peek-char
214        :stream-read-line
215        ;; STREAM-FILE-POSITION is not available on all implementations, or
216        ;; partially under a different name.
217        ; :stream-file-posiion
218      :stream-listen      :stream-listen
219      :stream-unread-char      :stream-unread-char
220      :stream-clear-input      :stream-clear-input
# Line 199  EXCEPT is a list of symbol names which s Line 251  EXCEPT is a list of symbol names which s
251                       (t (error "Malformed syntax in WITH-STRUCT: ~A" name))))                       (t (error "Malformed syntax in WITH-STRUCT: ~A" name))))
252            ,@body)))))            ,@body)))))
253    
254    (defun with-symbol (name package)
255      "Generate a form suitable for testing with #+."
256      (if (find-symbol (string name) (string package))
257          '(:and)
258          '(:or)))
259    
260    
261  ;;;; TCP server  ;;;; TCP server
262    
# Line 212  EXCEPT is a list of symbol names which s Line 270  EXCEPT is a list of symbol names which s
270    "Close the socket SOCKET.")    "Close the socket SOCKET.")
271    
272  (definterface accept-connection (socket &key external-format  (definterface accept-connection (socket &key external-format
273                                          buffering)                                          buffering timeout)
274     "Accept a client connection on the listening socket SOCKET.     "Accept a client connection on the listening socket SOCKET.
275  Return a stream for the new connection.")  Return a stream for the new connection.")
276    
# Line 232  Return a stream for the new connection." Line 290  Return a stream for the new connection."
290    "Return one of the symbols :spawn, :sigio, :fd-handler, or NIL."    "Return one of the symbols :spawn, :sigio, :fd-handler, or NIL."
291    nil)    nil)
292    
293    (definterface set-stream-timeout (stream timeout)
294      "Set the 'stream 'timeout.  The timeout is either the real number
295      specifying the timeout in seconds or 'nil for no timeout."
296      (declare (ignore stream timeout))
297      nil)
298    
299  ;;; Base condition for networking errors.  ;;; Base condition for networking errors.
300  (define-condition network-error (simple-error) ())  (define-condition network-error (simple-error) ())
301    
# Line 249  that the calling thread is the one that Line 313  that the calling thread is the one that
313    
314  (defconstant +sigint+ 2)  (defconstant +sigint+ 2)
315    
 (definterface call-without-interrupts (fn)  
   "Call FN in a context where interrupts are disabled."  
   (funcall fn))  
   
316  (definterface getpid ()  (definterface getpid ()
317    "Return the (Unix) process ID of this superior Lisp.")    "Return the (Unix) process ID of this superior Lisp.")
318    
319    (definterface install-sigint-handler (function)
320      "Call FUNCTION on SIGINT (instead of invoking the debugger).
321    Return old signal handler."
322      (declare (ignore function))
323      nil)
324    
325    (definterface call-with-user-break-handler (handler function)
326      "Install the break handler HANDLER while executing FUNCTION."
327      (let ((old-handler (install-sigint-handler handler)))
328        (unwind-protect (funcall function)
329          (install-sigint-handler old-handler))))
330    
331    (definterface quit-lisp ()
332      "Exit the current lisp image.")
333    
334  (definterface lisp-implementation-type-name ()  (definterface lisp-implementation-type-name ()
335    "Return a short name for the Lisp implementation."    "Return a short name for the Lisp implementation."
336    (lisp-implementation-type))    (lisp-implementation-type))
337    
338    (definterface socket-fd (socket-stream)
339      "Return the file descriptor for SOCKET-STREAM.")
340    
341    (definterface make-fd-stream (fd external-format)
342      "Create a character stream for the file descriptor FD.")
343    
344    (definterface dup (fd)
345      "Duplicate a file descriptor.
346    If the syscall fails, signal a condition.
347    See dup(2).")
348    
349    (definterface exec-image (image-file args)
350      "Replace the current process with a new process image.
351    The new image is created by loading the previously dumped
352    core file IMAGE-FILE.
353    ARGS is a list of strings passed as arguments to
354    the new image.
355    This is thin wrapper around exec(3).")
356    
357    (definterface command-line-args ()
358      "Return a list of strings as passed by the OS.")
359    
360    
361    ;; pathnames are sooo useless
362    
363    (definterface filename-to-pathname (filename)
364      "Return a pathname for FILENAME.
365    A filename in Emacs may for example contain asterisks which should not
366    be translated to wildcards."
367      (parse-namestring filename))
368    
369    (definterface pathname-to-filename (pathname)
370      "Return the filename for PATHNAME."
371      (namestring pathname))
372    
373  (definterface default-directory ()  (definterface default-directory ()
374    "Return the default directory."    "Return the default directory."
375    (directory-namestring (truename *default-pathname-defaults*)))    (directory-namestring (truename *default-pathname-defaults*)))
# Line 270  This is used to resolve filenames withou Line 380  This is used to resolve filenames withou
380    (setf *default-pathname-defaults* (truename (merge-pathnames directory)))    (setf *default-pathname-defaults* (truename (merge-pathnames directory)))
381    (default-directory))    (default-directory))
382    
383    
384  (definterface call-with-syntax-hooks (fn)  (definterface call-with-syntax-hooks (fn)
385    "Call FN with hooks to handle special syntax."    "Call FN with hooks to handle special syntax."
386    (funcall fn))    (funcall fn))
# Line 278  This is used to resolve filenames withou Line 389  This is used to resolve filenames withou
389    "Return a suitable initial value for SWANK:*READTABLE-ALIST*."    "Return a suitable initial value for SWANK:*READTABLE-ALIST*."
390    '())    '())
391    
 (definterface quit-lisp ()  
   "Exit the current lisp image.")  
   
392    
393  ;;;; Compilation  ;;;; Compilation
394    
# Line 292  This is used to resolve filenames withou Line 400  This is used to resolve filenames withou
400    (declare (ignore ignore))    (declare (ignore ignore))
401    `(call-with-compilation-hooks (lambda () (progn ,@body))))    `(call-with-compilation-hooks (lambda () (progn ,@body))))
402    
403  (definterface swank-compile-string (string &key buffer position directory)  (definterface swank-compile-string (string &key buffer position filename
404    "Compile source from STRING.  During compilation, compiler                                             policy)
405  conditions must be trapped and resignalled as COMPILER-CONDITIONs.    "Compile source from STRING.
406    During compilation, compiler conditions must be trapped and
407    resignalled as COMPILER-CONDITIONs.
408    
409  If supplied, BUFFER and POSITION specify the source location in Emacs.  If supplied, BUFFER and POSITION specify the source location in Emacs.
410    
411  Additionally, if POSITION is supplied, it must be added to source  Additionally, if POSITION is supplied, it must be added to source
412  positions reported in compiler conditions.  positions reported in compiler conditions.
413    
414  If DIRECTORY is specified it may be used by certain implementations to  If FILENAME is specified it may be used by certain implementations to
415  rebind *DEFAULT-PATHNAME-DEFAULTS* which may improve the recording of  rebind *DEFAULT-PATHNAME-DEFAULTS* which may improve the recording of
416  source information.")  source information.
417    
418  (definterface operate-on-system (system-name operation-name &rest keyword-args)  If POLICY is supplied, and non-NIL, it may be used by certain
419    "Perform OPERATION-NAME on SYSTEM-NAME using ASDF.  implementations to compile with a debug optimization quality of its
420  The KEYWORD-ARGS are passed on to the operation.  value.
421  Example:  
422  \(operate-on-system \"SWANK\" \"COMPILE-OP\" :force t)"  Should return T on successfull compilation, NIL otherwise.
423    (unless (member :asdf *features*)  ")
424      (error "ASDF is not loaded."))  
425    (with-compilation-hooks ()  (definterface swank-compile-file (input-file output-file load-p
426      (let ((operate (find-symbol "OPERATE" :asdf))                                               external-format)
427            (operation (find-symbol operation-name :asdf)))     "Compile INPUT-FILE signalling COMPILE-CONDITIONs.
428        (when (null operation)  If LOAD-P is true, load the file after compilation.
429          (error "Couldn't find ASDF operation ~S" operation-name))  EXTERNAL-FORMAT is a value returned by find-external-format or
430        (apply operate operation system-name keyword-args))))  :default.
431    
432  (definterface swank-compile-file (filename load-p &optional external-format)  Should return OUTPUT-TRUENAME, WARNINGS-P and FAILURE-p
433     "Compile FILENAME signalling COMPILE-CONDITIONs.  like `compile-file'")
 If LOAD-P is true, load the file after compilation.")  
434    
435  (deftype severity ()  (deftype severity ()
436    '(member :error :read-error :warning :style-warning :note))    '(member :error :read-error :warning :style-warning :note :redefinition))
437    
438  ;; Base condition type for compiler errors, warnings and notes.  ;; Base condition type for compiler errors, warnings and notes.
439  (define-condition compiler-condition (condition)  (define-condition compiler-condition (condition)
# Line 342  If LOAD-P is true, load the file after c Line 451  If LOAD-P is true, load the file after c
451     (message :initarg :message     (message :initarg :message
452              :accessor message)              :accessor message)
453    
454     (short-message :initarg :short-message     ;; Macro expansion history etc. which may be helpful in some cases
455                    :initform nil     ;; but is often very verbose.
456                    :accessor short-message)     (source-context :initarg :source-context
457                       :type (or null string)
458                       :initform nil
459                       :accessor source-context)
460    
461     (references :initarg :references     (references :initarg :references
462                 :initform nil                 :initform nil
# Line 353  If LOAD-P is true, load the file after c Line 465  If LOAD-P is true, load the file after c
465     (location :initarg :location     (location :initarg :location
466               :accessor location)))               :accessor location)))
467    
468    (definterface find-external-format (coding-system)
469      "Return a \"external file format designator\" for CODING-SYSTEM.
470    CODING-SYSTEM is Emacs-style coding system name (a string),
471    e.g. \"latin-1-unix\"."
472      (if (equal coding-system "iso-latin-1-unix")
473          :default
474          nil))
475    
476    (definterface guess-external-format (pathname)
477      "Detect the external format for the file with name pathname.
478    Return nil if the file contains no special markers."
479      ;; Look for a Emacs-style -*- coding: ... -*- or Local Variable: section.
480      (with-open-file (s pathname :if-does-not-exist nil
481                         :external-format (or (find-external-format "latin-1-unix")
482                                              :default))
483        (if s
484            (or (let* ((line (read-line s nil))
485                       (p (search "-*-" line)))
486                  (when p
487                    (let* ((start (+ p (length "-*-")))
488                           (end (search "-*-" line :start2 start)))
489                      (when end
490                        (%search-coding line start end)))))
491                (let* ((len (file-length s))
492                       (buf (make-string (min len 3000))))
493                  (file-position s (- len (length buf)))
494                  (read-sequence buf s)
495                  (let ((start (search "Local Variables:" buf :from-end t))
496                        (end (search "End:" buf :from-end t)))
497                    (and start end (< start end)
498                         (%search-coding buf start end))))))))
499    
500    (defun %search-coding (str start end)
501      (let ((p (search "coding:" str :start2 start :end2 end)))
502        (when p
503          (incf p (length "coding:"))
504          (loop while (and (< p end)
505                           (member (aref str p) '(#\space #\tab)))
506                do (incf p))
507          (let ((end (position-if (lambda (c) (find c '(#\space #\tab #\newline)))
508                                  str :start p)))
509            (find-external-format (subseq str p end))))))
510    
511    
512  ;;;; Streams  ;;;; Streams
513    
514  (definterface make-fn-streams (input-fn output-fn)  (definterface make-output-stream (write-string)
515     "Return character input and output streams backended by functions.    "Return a new character output stream.
516  When input is needed, INPUT-FN is called with no arguments to  The stream calls WRITE-STRING when output is ready.")
517  return a string.  
518  When output is ready, OUTPUT-FN is called with the output as its  (definterface make-input-stream (read-string)
519  argument.    "Return a new character input stream.
520    The stream calls READ-STRING when input is needed.")
 Output should be forced to OUTPUT-FN before calling INPUT-FN.  
   
 The streams are returned as two values.")  
   
 (definterface make-stream-interactive (stream)  
   "Do any necessary setup to make STREAM work interactively.  
 This is called for each stream used for interaction with the user  
 \(e.g. *standard-output*). An implementation could setup some  
 implementation-specific functions to control output flushing at the  
 like."  
   (declare (ignore stream))  
   nil)  
521    
522    
523  ;;;; Documentation  ;;;; Documentation
# Line 383  like." Line 526  like."
526     "Return the lambda list for the symbol NAME. NAME can also be     "Return the lambda list for the symbol NAME. NAME can also be
527  a lisp function object, on lisps which support this.  a lisp function object, on lisps which support this.
528    
529  The result can be a list or the :not-available if the arglist  The result can be a list or the :not-available keyword if the
530  cannot be determined."  arglist cannot be determined."
531     (declare (ignore name))     (declare (ignore name))
532     :not-available)     :not-available)
533    
534    (defgeneric declaration-arglist (decl-identifier)
535      (:documentation
536       "Return the argument list of the declaration specifier belonging to the
537    declaration identifier DECL-IDENTIFIER. If the arglist cannot be determined,
538    the keyword :NOT-AVAILABLE is returned.
539    
540    The different SWANK backends can specialize this generic function to
541    include implementation-dependend declaration specifiers, or to provide
542    additional information on the specifiers defined in ANSI Common Lisp.")
543      (:method (decl-identifier)
544        (case decl-identifier
545          (dynamic-extent '(&rest variables))
546          (ignore         '(&rest variables))
547          (ignorable      '(&rest variables))
548          (special        '(&rest variables))
549          (inline         '(&rest function-names))
550          (notinline      '(&rest function-names))
551          (declaration    '(&rest names))
552          (optimize       '(&any compilation-speed debug safety space speed))
553          (type           '(type-specifier &rest args))
554          (ftype          '(type-specifier &rest function-names))
555          (otherwise
556           (flet ((typespec-p (symbol) (member :type (describe-symbol-for-emacs symbol))))
557             (cond ((and (symbolp decl-identifier) (typespec-p decl-identifier))
558                    '(&rest variables))
559                   ((and (listp decl-identifier) (typespec-p (first decl-identifier)))
560                    '(&rest variables))
561                   (t :not-available)))))))
562    
563    (defgeneric type-specifier-arglist (typespec-operator)
564      (:documentation
565       "Return the argument list of the type specifier belonging to
566    TYPESPEC-OPERATOR.. If the arglist cannot be determined, the keyword
567    :NOT-AVAILABLE is returned.
568    
569    The different SWANK backends can specialize this generic function to
570    include implementation-dependend declaration specifiers, or to provide
571    additional information on the specifiers defined in ANSI Common Lisp.")
572      (:method (typespec-operator)
573        (declare (special *type-specifier-arglists*)) ; defined at end of file.
574        (typecase typespec-operator
575          (symbol (or (cdr (assoc typespec-operator *type-specifier-arglists*))
576                      :not-available))
577          (t :not-available))))
578    
579  (definterface function-name (function)  (definterface function-name (function)
580    "Return the name of the function object FUNCTION.    "Return the name of the function object FUNCTION.
581    
# Line 421  NIL." Line 609  NIL."
609                     (values new-form expanded)))))                     (values new-form expanded)))))
610      (frob form env)))      (frob form env)))
611    
612    (definterface format-string-expand (control-string)
613      "Expand the format string CONTROL-STRING."
614      (macroexpand `(formatter ,control-string)))
615    
616  (definterface describe-symbol-for-emacs (symbol)  (definterface describe-symbol-for-emacs (symbol)
617     "Return a property list describing SYMBOL.     "Return a property list describing SYMBOL.
618    
# Line 470  For example, this is a reasonable place Line 662  For example, this is a reasonable place
662  to safe reader/printer settings, and so on.")  to safe reader/printer settings, and so on.")
663    
664  (definterface call-with-debugger-hook (hook fun)  (definterface call-with-debugger-hook (hook fun)
665    "Call FUN and use HOOK as debugger hook.    "Call FUN and use HOOK as debugger hook. HOOK can be NIL.
666    
667  HOOK should be called for both BREAK and INVOKE-DEBUGGER."  HOOK should be called for both BREAK and INVOKE-DEBUGGER."
668    (let ((*debugger-hook* hook))    (let ((*debugger-hook* hook))
# Line 492  debug the debugger! Instead, such condit Line 684  debug the debugger! Instead, such condit
684  user without (re)entering the debugger by wrapping them as  user without (re)entering the debugger by wrapping them as
685  `sldb-condition's."))  `sldb-condition's."))
686    
687    ;;; The following functions in this section are supposed to be called
688    ;;; within the dynamic contour of CALL-WITH-DEBUGGING-ENVIRONMENT only.
689    
690  (definterface compute-backtrace (start end)  (definterface compute-backtrace (start end)
691     "Return a list containing a backtrace of the condition current     "Returns a backtrace of the condition currently being debugged,
692  being debugged.  The results are unspecified if this function is  that is an ordered list consisting of frames. ``Ordered list''
693  called outside the dynamic contour CALL-WITH-DEBUGGING-ENVIRONMENT.  means that an integer I can be mapped back to the i-th frame of this
694    backtrace.
695    
696  START and END are zero-based indices constraining the number of frames  START and END are zero-based indices constraining the number of frames
697  returned.  Frame zero is defined as the frame which invoked the  returned. Frame zero is defined as the frame which invoked the
698  debugger.  If END is nil, return the frames from START to the end of  debugger. If END is nil, return the frames from START to the end of
699  the stack.")  the stack.")
700    
701  (definterface print-frame (frame stream)  (definterface print-frame (frame stream)
702    "Print frame to stream.")    "Print frame to stream.")
703    
704  (definterface frame-source-location-for-emacs (frame-number)  (definterface frame-restartable-p (frame)
705    "Return the source location for FRAME-NUMBER.")    "Is the frame FRAME restartable?.
706    Return T if `restart-frame' can safely be called on the frame."
707      (declare (ignore frame))
708      nil)
709    
710    (definterface frame-source-location (frame-number)
711      "Return the source location for the frame associated to FRAME-NUMBER.")
712    
713  (definterface frame-catch-tags (frame-number)  (definterface frame-catch-tags (frame-number)
714    "Return a list of XXX list of what? catch tags for a debugger    "Return a list of catch tags for being printed in a debugger stack
715  stack frame.  The results are undefined unless this is called  frame."
716  within the dynamic contour of a function defined by    (declare (ignore frame-number))
717  DEFINE-DEBUGGER-HOOK.")    '())
718    
719  (definterface frame-locals (frame-number)  (definterface frame-locals (frame-number)
720    "Return a list of XXX local variable designators define me    "Return a list of ((&key NAME ID VALUE) ...) where each element of
721  for a debugger stack frame.  The results are undefined unless  the list represents a local variable in the stack frame associated to
722  this is called within the dynamic contour of a function defined  FRAME-NUMBER.
723  by DEFINE-DEBUGGER-HOOK.")  
724    NAME, a symbol; the name of the local variable.
725  (definterface frame-var-value (frame var)  
726    "Return the value of VAR in FRAME.  ID, an integer; used as primary key for the local variable, unique
727  FRAME is the number of the frame in the backtrace.  relatively to the frame under operation.
728  VAR is the number of the variable in the frame.")  
729    value, an object; the value of the local variable.")
730    
731    (definterface frame-var-value (frame-number var-id)
732      "Return the value of the local variable associated to VAR-ID
733    relatively to the frame associated to FRAME-NUMBER.")
734    
735  (definterface disassemble-frame (frame-number)  (definterface disassemble-frame (frame-number)
736    "Disassemble the code for the FRAME-NUMBER.    "Disassemble the code for the FRAME-NUMBER.
# Line 532  FRAME-NUMBER is a non-negative integer." Line 739  FRAME-NUMBER is a non-negative integer."
739    
740  (definterface eval-in-frame (form frame-number)  (definterface eval-in-frame (form frame-number)
741     "Evaluate a Lisp form in the lexical context of a stack frame     "Evaluate a Lisp form in the lexical context of a stack frame
742  in the debugger.  The results are undefined unless called in the  in the debugger.
 dynamic contour of a function defined by DEFINE-DEBUGGER-HOOK.  
743    
744  FRAME-NUMBER must be a positive integer with 0 indicating the  FRAME-NUMBER must be a positive integer with 0 indicating the
745  frame which invoked the debugger.  frame which invoked the debugger.
# Line 541  frame which invoked the debugger. Line 747  frame which invoked the debugger.
747  The return value is the result of evaulating FORM in the  The return value is the result of evaulating FORM in the
748  appropriate context.")  appropriate context.")
749    
750    (definterface frame-call (frame-number)
751      "Return a string representing a call to the entry point of a frame.")
752    
753  (definterface return-from-frame (frame-number form)  (definterface return-from-frame (frame-number form)
754    "Unwind the stack to the frame FRAME-NUMBER and return the value(s)    "Unwind the stack to the frame FRAME-NUMBER and return the value(s)
755  produced by evaluating FORM in the frame context to its caller.  produced by evaluating FORM in the frame context to its caller.
# Line 559  as it was called originally.") Line 768  as it was called originally.")
768    "Format a condition for display in SLDB."    "Format a condition for display in SLDB."
769    (princ-to-string condition))    (princ-to-string condition))
770    
 (definterface condition-references (condition)  
   "Return a list of documentation references for a condition.  
 Each reference is one of:  
   (:ANSI-CL  
    {:FUNCTION | :SPECIAL-OPERATOR | :MACRO | :SECTION | :GLOSSARY }  
    symbol-or-name)  
   (:SBCL :NODE node-name)"  
   (declare (ignore condition))  
   '())  
   
771  (definterface condition-extras (condition)  (definterface condition-extras (condition)
772    "Return a list of extra for the debugger.    "Return a list of extra for the debugger.
773  The allowed elements are of the form:  The allowed elements are of the form:
774    (:SHOW-FRAME-SOURCE frame-number)"    (:SHOW-FRAME-SOURCE frame-number)
775      (:REFERENCES &rest refs)
776    "
777    (declare (ignore condition))    (declare (ignore condition))
778    '())    '())
779    
# Line 585  The allowed elements are of the form: Line 786  The allowed elements are of the form:
786  (definterface sldb-break-at-start (symbol)  (definterface sldb-break-at-start (symbol)
787    "Set a breakpoint on the beginning of the function for SYMBOL.")    "Set a breakpoint on the beginning of the function for SYMBOL.")
788    
789    (definterface sldb-stepper-condition-p (condition)
790      "Return true if SLDB was invoked due to a single-stepping condition,
791    false otherwise. "
792      (declare (ignore condition))
793      nil)
794    
795    (definterface sldb-step-into ()
796      "Step into the current single-stepper form.")
797    
798    (definterface sldb-step-next ()
799      "Step to the next form in the current function.")
800    
801    (definterface sldb-step-out ()
802      "Stop single-stepping temporarily, but resume it once the current function
803    returns.")
804    
805    
806  ;;;; Definition finding  ;;;; Definition finding
# Line 604  The allowed elements are of the form: Line 820  The allowed elements are of the form:
820  (defstruct (:buffer (:type list) :named (:constructor)) name)  (defstruct (:buffer (:type list) :named (:constructor)) name)
821  (defstruct (:position (:type list) :named (:constructor)) pos)  (defstruct (:position (:type list) :named (:constructor)) pos)
822    
823    (defun make-error-location (datum &rest args)
824      (cond ((typep datum 'condition)
825             `(:error ,(format nil "Error: ~A" datum)))
826            ((symbolp datum)
827             `(:error ,(format nil "Error: ~A" (apply #'make-condition datum args))))
828            (t
829             (assert (stringp datum))
830             `(:error ,(apply #'format nil datum args)))))
831    
832  (definterface find-definitions (name)  (definterface find-definitions (name)
833     "Return a list ((DSPEC LOCATION) ...) for NAME's definitions.     "Return a list ((DSPEC LOCATION) ...) for NAME's definitions.
834    
# Line 615  definition, e.g., FOO or (METHOD FOO (ST Line 840  definition, e.g., FOO or (METHOD FOO (ST
840    
841  LOCATION is the source location for the definition.")  LOCATION is the source location for the definition.")
842    
843    (definterface find-source-location (object)
844      "Returns the source location of OBJECT, or NIL.
845    
846    That is the source location of the underlying datastructure of
847    OBJECT. E.g. on a STANDARD-OBJECT, the source location of the
848    respective DEFCLASS definition is returned, on a STRUCTURE-CLASS the
849    respective DEFSTRUCT definition, and so on."
850      ;; This returns one source location and not a list of locations. It's
851      ;; supposed to return the location of the DEFGENERIC definition on
852      ;; #'SOME-GENERIC-FUNCTION.
853      (declare (ignore object))
854      (make-error-location "FIND-DEFINITIONS is not yet implemented on ~
855                            this implementation."))
856    
857    
858  (definterface buffer-first-change (filename)  (definterface buffer-first-change (filename)
859    "Called for effect the first time FILENAME's buffer is modified."    "Called for effect the first time FILENAME's buffer is modified."
860    (declare (ignore filename))    (declare (ignore filename))
861    nil)    nil)
862    
863    
864    
865  ;;;; XREF  ;;;; XREF
866    
867  (definterface who-calls (function-name)  (definterface who-calls (function-name)
868    "Return the call sites of FUNCTION-NAME (a symbol).    "Return the call sites of FUNCTION-NAME (a symbol).
869  The results is a list ((DSPEC LOCATION) ...).")  The results is a list ((DSPEC LOCATION) ...)."
870      (declare (ignore function-name))
871      :not-implemented)
872    
873  (definterface calls-who (function-name)  (definterface calls-who (function-name)
874    "Return the call sites of FUNCTION-NAME (a symbol).    "Return the call sites of FUNCTION-NAME (a symbol).
875  The results is a list ((DSPEC LOCATION) ...).")  The results is a list ((DSPEC LOCATION) ...)."
876      (declare (ignore function-name))
877      :not-implemented)
878    
879  (definterface who-references (variable-name)  (definterface who-references (variable-name)
880    "Return the locations where VARIABLE-NAME (a symbol) is referenced.    "Return the locations where VARIABLE-NAME (a symbol) is referenced.
881  See WHO-CALLS for a description of the return value.")  See WHO-CALLS for a description of the return value."
882      (declare (ignore variable-name))
883      :not-implemented)
884    
885  (definterface who-binds (variable-name)  (definterface who-binds (variable-name)
886    "Return the locations where VARIABLE-NAME (a symbol) is bound.    "Return the locations where VARIABLE-NAME (a symbol) is bound.
887  See WHO-CALLS for a description of the return value.")  See WHO-CALLS for a description of the return value."
888      (declare (ignore variable-name))
889      :not-implemented)
890    
891  (definterface who-sets (variable-name)  (definterface who-sets (variable-name)
892    "Return the locations where VARIABLE-NAME (a symbol) is set.    "Return the locations where VARIABLE-NAME (a symbol) is set.
893  See WHO-CALLS for a description of the return value.")  See WHO-CALLS for a description of the return value."
894      (declare (ignore variable-name))
895      :not-implemented)
896    
897  (definterface who-macroexpands (macro-name)  (definterface who-macroexpands (macro-name)
898    "Return the locations where MACRO-NAME (a symbol) is expanded.    "Return the locations where MACRO-NAME (a symbol) is expanded.
899  See WHO-CALLS for a description of the return value.")  See WHO-CALLS for a description of the return value."
900      (declare (ignore macro-name))
901      :not-implemented)
902    
903  (definterface who-specializes (class-name)  (definterface who-specializes (class-name)
904    "Return the locations where CLASS-NAME (a symbol) is specialized.    "Return the locations where CLASS-NAME (a symbol) is specialized.
905  See WHO-CALLS for a description of the return value.")  See WHO-CALLS for a description of the return value."
906      (declare (ignore class-name))
907      :not-implemented)
908    
909  ;;; Simpler variants.  ;;; Simpler variants.
910    
# Line 706  themselves, that is, their dispatch func Line 961  themselves, that is, their dispatch func
961    
962  ;;;; Inspector  ;;;; Inspector
963    
964  (defclass inspector ()  (defgeneric emacs-inspect (object)
965    ()    (:documentation
   (:documentation "Super class of inspector objects.  
   
 Implementations should sub class in order to dispatch off of the  
 inspect-for-emacs method."))  
   
 (definterface make-default-inspector ()  
   "Return an inspector object suitable for passing to inspect-for-emacs.")  
   
 (definterface inspect-for-emacs (object inspector)  
966     "Explain to Emacs how to inspect OBJECT.     "Explain to Emacs how to inspect OBJECT.
967    
968  The argument INSPECTOR is an object representing how to get at  Returns a list specifying how to render the object for inspection.
 the internals of OBJECT, it is usually an implementation specific  
 class used simply for dispatching to the proper method.  
   
 The orgument INSPECTION-MODE is an object specifying how, and  
 what, to show to the user.  
   
 Returns two values: a string which will be used as the title of  
 the inspector buffer and a list specifying how to render the  
 object for inspection.  
969    
970  Every element of the list must be either a string, which will be  Every element of the list must be either a string, which will be
971  inserted into the buffer as is, or a list of the form:  inserted into the buffer as is, or a list of the form:
# Line 739  inserted into the buffer as is, or a lis Line 976  inserted into the buffer as is, or a lis
976    
977   (:newline) - Render a \\n   (:newline) - Render a \\n
978    
979   (:action label lambda) - Render LABEL (a text string) which when   (:action label lambda &key (refresh t)) - Render LABEL (a text
980   clicked will call LAMBDA.   string) which when clicked will call LAMBDA. If REFRESH is
981     non-NIL the currently inspected object will be re-inspected
982   NIL - do nothing.")   after calling the lambda.
983    "))
984    
985  (defmethod inspect-for-emacs ((object t) (inspector t))  (defmethod emacs-inspect ((object t))
986    "Generic method for inspecting any kind of object.    "Generic method for inspecting any kind of object.
987    
988  Since we don't know how to deal with OBJECT we simply dump the  Since we don't know how to deal with OBJECT we simply dump the
989  output of CL:DESCRIBE."  output of CL:DESCRIBE."
   (declare (ignore inspector))  
   (values  
    "A value."  
990     `("Type: " (:value ,(type-of object)) (:newline)     `("Type: " (:value ,(type-of object)) (:newline)
991       "Don't know how to inspect the object, dumping output of CL:DESCRIBE:"       "Don't know how to inspect the object, dumping output of CL:DESCRIBE:"
992       (:newline) (:newline)       (:newline) (:newline)
993       ,(with-output-to-string (desc) (describe object desc)))))       ,(with-output-to-string (desc) (describe object desc))))
994    
995    
996  ;;; Utilities for inspector methods.  ;;; Utilities for inspector methods.
997  ;;;  ;;;
998  (defun label-value-line (label value)  
999    "Create a control list which prints \"LABEL: VALUE\" in the inspector."  (defun label-value-line (label value &key (newline t))
1000    (list (princ-to-string label) ": " `(:value ,value) '(:newline)))    "Create a control list which prints \"LABEL: VALUE\" in the inspector.
1001    If NEWLINE is non-NIL a `(:newline)' is added to the result."
1002    
1003      (list* (princ-to-string label) ": " `(:value ,value)
1004             (if newline '((:newline)) nil)))
1005    
1006  (defmacro label-value-line* (&rest label-values)  (defmacro label-value-line* (&rest label-values)
1007    ` (append ,@(loop for (label value) in label-values    ` (append ,@(loop for (label value) in label-values
# Line 778  output of CL:DESCRIBE." Line 1018  output of CL:DESCRIBE."
1018  ;;; The default implementations are sufficient for non-multiprocessing  ;;; The default implementations are sufficient for non-multiprocessing
1019  ;;; implementations.  ;;; implementations.
1020    
1021  (definterface initialize-multiprocessing ()  (definterface initialize-multiprocessing (continuation)
1022     "Initialize multiprocessing, if necessary."     "Initialize multiprocessing, if necessary and then invoke CONTINUATION.
    nil)  
1023    
1024  (definterface startup-idle-and-top-level-loops ()  Depending on the impleimentaion, this function may never return."
1025    "This function is called directly through the listener, not in an RPC     (funcall continuation))
 from Emacs. This is to support interfaces such as CMUCL's  
 MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS which does not return like a  
 normal function."  
    nil)  
1026    
1027  (definterface spawn (fn &key name)  (definterface spawn (fn &key name)
1028    "Create a new thread to call FN.")    "Create a new thread to call FN.")
# Line 796  normal function." Line 1031  normal function."
1031    "Return an Emacs-parsable object to identify THREAD.    "Return an Emacs-parsable object to identify THREAD.
1032    
1033  Ids should be comparable with equal, i.e.:  Ids should be comparable with equal, i.e.:
1034   (equal (thread-id <t1>) (thread-id <t2>)) <==> (eq <t1> <t2>)")   (equal (thread-id <t1>) (thread-id <t2>)) <==> (eq <t1> <t2>)"
1035      thread)
1036    
1037  (definterface find-thread (id)  (definterface find-thread (id)
1038    "Return the thread for ID.    "Return the thread for ID.
1039  ID should be an id previously obtained with THREAD-ID.  ID should be an id previously obtained with THREAD-ID.
1040  Can return nil if the thread no longer exists.")  Can return nil if the thread no longer exists."
1041      (declare (ignore id))
1042      (current-thread))
1043    
1044  (definterface thread-name (thread)  (definterface thread-name (thread)
1045     "Return the name of THREAD.     "Return the name of THREAD.
1046    Thread names are short strings meaningful to the user. They do not
1047  Thread names are be single-line strings and are meaningful to the  have to be unique."
 user. They do not have to be unique."  
1048     (declare (ignore thread))     (declare (ignore thread))
1049     "The One True Thread")     "The One True Thread")
1050    
# Line 816  user. They do not have to be unique." Line 1053  user. They do not have to be unique."
1053     (declare (ignore thread))     (declare (ignore thread))
1054     "")     "")
1055    
1056    (definterface thread-attributes (thread)
1057      "Return a plist of implementation-dependent attributes for THREAD"
1058      (declare (ignore thread))
1059      '())
1060    
1061  (definterface make-lock (&key name)  (definterface make-lock (&key name)
1062     "Make a lock for thread synchronization.     "Make a lock for thread synchronization.
1063  Only one thread may hold the lock (via CALL-WITH-LOCK-HELD) at a time."  Only one thread may hold the lock (via CALL-WITH-LOCK-HELD) at a time
1064    but that thread may hold it more than once."
1065     (declare (ignore name))     (declare (ignore name))
1066     :null-lock)     :null-lock)
1067    
# Line 833  Only one thread may hold the lock (via C Line 1076  Only one thread may hold the lock (via C
1076    0)    0)
1077    
1078  (definterface all-threads ()  (definterface all-threads ()
1079    "Return a list of all threads.")    "Return a fresh list of all threads."
1080      '())
1081    
1082  (definterface thread-alive-p (thread)  (definterface thread-alive-p (thread)
1083    "Test if THREAD is termintated."    "Test if THREAD is termintated."
# Line 843  Only one thread may hold the lock (via C Line 1087  Only one thread may hold the lock (via C
1087    "Cause THREAD to execute FN.")    "Cause THREAD to execute FN.")
1088    
1089  (definterface kill-thread (thread)  (definterface kill-thread (thread)
1090    "Kill THREAD."    "Terminate THREAD immediately.
1091    Don't execute unwind-protected sections, don't raise conditions.
1092    (Do not pass go, do not collect $200.)"
1093    (declare (ignore thread))    (declare (ignore thread))
1094    nil)    nil)
1095    
1096  (definterface send (thread object)  (definterface send (thread object)
1097    "Send OBJECT to thread THREAD.")    "Send OBJECT to thread THREAD.")
1098    
1099  (definterface receive ()  (definterface receive (&optional timeout)
1100    "Return the next message from current thread's mailbox.")    "Return the next message from current thread's mailbox."
1101      (receive-if (constantly t) timeout))
1102    
1103    (definterface receive-if (predicate &optional timeout)
1104      "Return the first message satisfiying PREDICATE.")
1105    
1106    (definterface set-default-initial-binding (var form)
1107      "Initialize special variable VAR by default with FORM.
1108    
1109    Some implementations initialize certain variables in each newly
1110    created thread.  This function sets the form which is used to produce
1111    the initial value."
1112      (set var (eval form)))
1113    
1114    ;; List of delayed interrupts.
1115    ;; This should only have thread-local bindings, so no init form.
1116    (defvar *pending-slime-interrupts*)
1117    
1118    (defun check-slime-interrupts ()
1119      "Execute pending interrupts if any.
1120    This should be called periodically in operations which
1121    can take a long time to complete.
1122    Return a boolean indicating whether any interrupts was processed."
1123      (when (and (boundp '*pending-slime-interrupts*)
1124                 *pending-slime-interrupts*)
1125        (funcall (pop *pending-slime-interrupts*))
1126        t))
1127    
1128    (defvar *interrupt-queued-handler* nil
1129      "Function to call on queued interrupts.
1130    Interrupts get queued when an interrupt occurs while interrupt
1131    handling is disabled.
1132    
1133    Backends can use this function to abort slow operations.")
1134    
1135    (definterface wait-for-input (streams &optional timeout)
1136      "Wait for input on a list of streams.  Return those that are ready.
1137    STREAMS is a list of streams
1138    TIMEOUT nil, t, or real number. If TIMEOUT is t, return
1139    those streams which are ready immediately, without waiting.
1140    If TIMEOUT is a number and no streams is ready after TIMEOUT seconds,
1141    return nil.
1142    
1143    Return :interrupt if an interrupt occurs while waiting."
1144      (assert (member timeout '(nil t)))
1145      (cond #+(or)
1146            ((null (cdr streams))
1147             (wait-for-one-stream (car streams) timeout))
1148            (t
1149             (wait-for-streams streams timeout))))
1150    
1151    (defun wait-for-streams (streams timeout)
1152      (loop
1153       (when (check-slime-interrupts) (return :interrupt))
1154       (let ((ready (remove-if-not #'stream-readable-p streams)))
1155         (when ready (return ready)))
1156       (when timeout (return nil))
1157       (sleep 0.1)))
1158    
1159    ;; Note: Usually we can't interrupt PEEK-CHAR cleanly.
1160    (defun wait-for-one-stream (stream timeout)
1161      (ecase timeout
1162        ((nil)
1163         (cond ((check-slime-interrupts) :interrupt)
1164               (t (peek-char nil stream nil nil)
1165                  (list stream))))
1166        ((t)
1167         (let ((c (read-char-no-hang stream nil nil)))
1168           (cond (c
1169                  (unread-char c stream)
1170                  (list stream))
1171                 (t '()))))))
1172    
1173    (defun stream-readable-p (stream)
1174      (let ((c (read-char-no-hang stream nil :eof)))
1175        (cond ((not c) nil)
1176              ((eq c :eof) t)
1177              (t (unread-char c stream) t))))
1178    
1179  (definterface toggle-trace (spec)  (definterface toggle-trace (spec)
1180    "Toggle tracing of the function(s) given with SPEC.    "Toggle tracing of the function(s) given with SPEC.
# Line 873  SPEC can be: Line 1196  SPEC can be:
1196  (definterface make-weak-value-hash-table (&rest args)  (definterface make-weak-value-hash-table (&rest args)
1197    "Like MAKE-HASH-TABLE, but weak w.r.t. the values."    "Like MAKE-HASH-TABLE, but weak w.r.t. the values."
1198    (apply #'make-hash-table args))    (apply #'make-hash-table args))
1199    
1200    (definterface hash-table-weakness (hashtable)
1201      "Return nil or one of :key :value :key-or-value :key-and-value"
1202      (declare (ignore hashtable))
1203      nil)
1204    
1205    
1206    ;;;; Character names
1207    
1208    (definterface character-completion-set (prefix matchp)
1209      "Return a list of names of characters that match PREFIX."
1210      ;; Handle the standard and semi-standard characters.
1211      (loop for name in '("Newline" "Space" "Tab" "Page" "Rubout"
1212                          "Linefeed" "Return" "Backspace")
1213         when (funcall matchp prefix name)
1214         collect name))
1215    
1216    
1217    (defparameter *type-specifier-arglists*
1218      '((and                . (&rest type-specifiers))
1219        (array              . (&optional element-type dimension-spec))
1220        (base-string        . (&optional size))
1221        (bit-vector         . (&optional size))
1222        (complex            . (&optional type-specifier))
1223        (cons               . (&optional car-typespec cdr-typespec))
1224        (double-float       . (&optional lower-limit upper-limit))
1225        (eql                . (object))
1226        (float              . (&optional lower-limit upper-limit))
1227        (function           . (&optional arg-typespec value-typespec))
1228        (integer            . (&optional lower-limit upper-limit))
1229        (long-float         . (&optional lower-limit upper-limit))
1230        (member             . (&rest eql-objects))
1231        (mod                . (n))
1232        (not                . (type-specifier))
1233        (or                 . (&rest type-specifiers))
1234        (rational           . (&optional lower-limit upper-limit))
1235        (real               . (&optional lower-limit upper-limit))
1236        (satisfies          . (predicate-symbol))
1237        (short-float        . (&optional lower-limit upper-limit))
1238        (signed-byte        . (&optional size))
1239        (simple-array       . (&optional element-type dimension-spec))
1240        (simple-base-string . (&optional size))
1241        (simple-bit-vector  . (&optional size))
1242        (simple-string      . (&optional size))
1243        (single-float       . (&optional lower-limit upper-limit))
1244        (simple-vector      . (&optional size))
1245        (string             . (&optional size))
1246        (unsigned-byte      . (&optional size))
1247        (values             . (&rest typespecs))
1248        (vector             . (&optional element-type size))
1249        ))
1250    
1251    ;;; Heap dumps
1252    
1253    (definterface save-image (filename &optional restart-function)
1254      "Save a heap image to the file FILENAME.
1255    RESTART-FUNCTION, if non-nil, should be called when the image is loaded.")
1256    
1257    
1258    

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.191

  ViewVC Help
Powered by ViewVC 1.1.5