/[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.22 by heller, Thu Jan 22 00:35:17 2004 UTC revision 1.22.2.2 by heller, Sat Jan 31 11:26:02 2004 UTC
# Line 114  Backends implement these functions using Line 114  Backends implement these functions using
114                                                 &rest ,received-args)                                                 &rest ,received-args)
115                 (destructuring-bind ,args ,received-args                 (destructuring-bind ,args ,received-args
116                   ,@default-body)))))                   ,@default-body)))))
117      `(prog1 (defgeneric ,name ,args (:documentation ,documentation))      `(progn (defgeneric ,name ,args (:documentation ,documentation))
118              (pushnew ',name *interface-functions*)              (pushnew ',name *interface-functions*)
119              ,(if (null default-body)              ,(if (null default-body)
120                   `(pushnew ',name *unimplemented-interfaces*)                   `(pushnew ',name *unimplemented-interfaces*)
121                   (gen-default-impl)))))                   (gen-default-impl))
122                ',name)))
123    
124  (defmacro defimplementation (name args &body body)  (defmacro defimplementation (name args &body body)
125    ;; Is this a macro no-no -- should it be pushed out of macroexpansion?    ;; Is this a macro no-no -- should it be pushed out of macroexpansion?
126    `(prog1 (defmethod ,name ,args ,@body)    `(progn (defmethod ,name ,args ,@body)
127      (if (member ',name *interface-functions*)            (if (member ',name *interface-functions*)
128          (setq *unimplemented-interfaces*                (setq *unimplemented-interfaces*
129                (remove ',name *unimplemented-interfaces*))                      (remove ',name *unimplemented-interfaces*))
130          (warn "DEFIMPLEMENTATION of undefined interface (~S)" ',name))))                (warn "DEFIMPLEMENTATION of undefined interface (~S)" ',name))
131              ',name))
132    
133  (defun warn-unimplemented-interfaces ()  (defun warn-unimplemented-interfaces ()
134    "Warn the user about unimplemented backend features.    "Warn the user about unimplemented backend features.
# Line 496  Only one thread may hold the lock (via C Line 498  Only one thread may hold the lock (via C
498     (declare (ignore lock))     (declare (ignore lock))
499     (funcall function))     (funcall function))
500    
501    (definterface current-thread ()
502      "Return the currently executing thread."
503      0)
504    
505    (definterface interrupt-thread (thread fn)
506      "Cause THREAD to execute FN.")
507    
508    (definterface send (thread object)
509      "Send OBJECT to thread THREAD.")
510    
511    (definterface receive ()
512      "Return the next message from current thread's mailbox.")
513    
514    
515  ;;;; XREF  ;;;; XREF
516    

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.22.2.2

  ViewVC Help
Powered by ViewVC 1.1.5