From be12be519eaa3a70f73e27b29f95dda491a37923 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 17 Feb 2008 17:47:25 +0100 Subject: Make the compiler macro for INVOKE more robust. darcs-hash:e56ef3368be1babcb16faead9276a36091cb26b5 --- Lisp/compiler-macros.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Lisp') 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))) -- cgit v1.2.3