diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-17 17:47:25 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-17 17:47:25 +0100 |
commit | be12be519eaa3a70f73e27b29f95dda491a37923 (patch) | |
tree | 5fee5916cf8c64b8568319b430093ef6cbd0a737 | |
parent | 856a3b637e91cb7adf95ea406d49383c2be0d3f2 (diff) |
Make the compiler macro for INVOKE more robust.
darcs-hash:e56ef3368be1babcb16faead9276a36091cb26b5
-rw-r--r-- | Lisp/compiler-macros.lisp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lisp/compiler-macros.lisp b/Lisp/compiler-macros.lisp index 77fb4b6..5ee8082 100644 --- a/Lisp/compiler-macros.lisp +++ b/Lisp/compiler-macros.lisp @@ -63,11 +63,14 @@ ;; This compiler macro is a bit more complicated than the preceding ;; ones. -(define-compiler-macro invoke (receiver message-start &rest message-components) +(define-compiler-macro invoke (&whole form + receiver message-start &rest message-components) (multiple-value-bind (method-name args) (split-method-call (if (and (consp message-start) (eq (first message-start) 'quote)) (second message-start) message-start) message-components) - `(invoke-by-name ,receiver (selector ',method-name) ,@args))) + (if (constantp method-name) + `(invoke-by-name ,receiver (selector ',method-name) ,@args) + form))) |