ViewVC logotype

Diff of /slime/swank-cmucl.lisp

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

revision 1.56 by lgorrie, Mon Jan 19 20:14:35 2004 UTC revision 1.57 by heller, Thu Jan 22 00:38:48 2004 UTC
# Line 165  Line 165 
165      (:unread (setf (aref (sis.buffer stream)      (:unread (setf (aref (sis.buffer stream)
166                           (decf (sis.index stream)))                           (decf (sis.index stream)))
167                     arg1))                     arg1))
168      (:clear-input (setf (sis.index stream) 0      (:clear-input
169         (setf (sis.index stream) 0
170                          (sis.buffer stream) ""))                          (sis.buffer stream) ""))
171      (:listen (< (sis.index stream) (length (sis.buffer stream))))      (:listen (< (sis.index stream) (length (sis.buffer stream))))
172      (:charpos nil)      (:charpos nil)
# Line 334  the error-context redundant." Line 335  the error-context redundant."
335  (defun lookup-xrefs (finder name)  (defun lookup-xrefs (finder name)
336    (xref-results-for-emacs (funcall finder (from-string name))))    (xref-results-for-emacs (funcall finder (from-string name))))
338  (defslimefun who-calls (function-name)  (defimplementation who-calls (function-name)
   "Return the places where FUNCTION-NAME is called."  
339    (lookup-xrefs #'xref:who-calls function-name))    (lookup-xrefs #'xref:who-calls function-name))
341  (defslimefun who-references (variable)  (defimplementation who-references (variable)
   "Return the places where the global variable VARIABLE is referenced."  
342    (lookup-xrefs #'xref:who-references variable))    (lookup-xrefs #'xref:who-references variable))
344  (defslimefun who-binds (variable)  (defimplementation who-binds (variable)
   "Return the places where the global variable VARIABLE is bound."  
345    (lookup-xrefs #'xref:who-binds variable))    (lookup-xrefs #'xref:who-binds variable))
347  (defslimefun who-sets (variable)  (defimplementation who-sets (variable)
   "Return the places where the global variable VARIABLE is set."  
348    (lookup-xrefs #'xref:who-sets variable))    (lookup-xrefs #'xref:who-sets variable))
350  #+cmu19  #+cmu19
351  (progn  (progn
352    (defslimefun who-macroexpands (macro)    (defimplementation who-macroexpands (macro)
     "Return the places where MACRO is expanded."  
353      (lookup-xrefs #'xref:who-macroexpands macro))      (lookup-xrefs #'xref:who-macroexpands macro))
355    (defslimefun who-specializes (class)    (defimplementation who-specializes (class)
     "Return the methods with specializers for CLASS."  
356      (let* ((methods (xref::who-specializes (find-class (from-string class))))      (let* ((methods (xref::who-specializes (find-class (from-string class))))
357             (locations (mapcar #'method-source-location methods)))             (locations (mapcar #'method-source-location methods)))
358        (group-xrefs (mapcar (lambda (m l)        (group-xrefs (mapcar (lambda (m l)
359                               (cons (let ((*print-pretty* nil))                               (cons (let ((*print-pretty* nil))
360                                       (to-string m))                                       (to-string m))
361                                     l))                                     l))
362                             methods locations))))                             methods locations)))))
364  (defun resolve-xref-location (xref)  (defun resolve-xref-location (xref)
365    (let ((name (xref:xref-context-name xref))    (let ((name (xref:xref-context-name xref))
# Line 522  the code omponent CODE." Line 516  the code omponent CODE."
516                         (function-source-location e)))                         (function-source-location e)))
517     :test #'equal))     :test #'equal))
519  (defslimefun list-callers (symbol-name)  (defimplementation list-callers (symbol-name)
520    "Return a list ((FILE . ((NAME . LOCATION) ...)) ...) of callers."    "Return a list ((FILE . ((NAME . LOCATION) ...)) ...) of callers."
521    (let ((components (function-callers (from-string symbol-name)))    (let ((components (function-callers (from-string symbol-name)))
522          (xrefs '()))          (xrefs '()))
# Line 536  the code omponent CODE." Line 530  the code omponent CODE."
530          (setq xrefs (nconc defs xrefs))))          (setq xrefs (nconc defs xrefs))))
531      (group-xrefs xrefs)))      (group-xrefs xrefs)))
533    (defimplementation list-callees (symbol-name)
 (defslimefun list-callees (symbol-name)  
534    (let ((fns (function-callees (from-string symbol-name))))    (let ((fns (function-callees (from-string symbol-name))))
535      (group-xrefs (mapcar (lambda (fn)      (group-xrefs (mapcar (lambda (fn)
536                             (cons (to-string (kernel:%function-name fn))                             (cons (to-string (kernel:%function-name fn))

Removed from v.1.56  
changed lines
  Added in v.1.57

  ViewVC Help
Powered by ViewVC 1.1.5