<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}}
</style>
<body>
<div class='content'>
<h3>Raymond Toy pushed to branch master at <a href="https://gitlab.common-lisp.net/cmucl/cmucl">cmucl / cmucl</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/c961673a4b7bdceeff80cd5ca5739746333aee3f">c961673a</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-04-25T09:15:02Z</i>
</div>
<pre class='commit-message'>Fix issue #1. Handle funcall in compiler macro functions.
Also added tests/issues.lisp with a corresponding test.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/code/defmacro.lisp
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
<span class='new-file'>
+
tests/issues.lisp
</span>
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/c961673a4b7bdceeff80cd5ca5739746333aee3f#diff-0'>
<strong>
src/code/defmacro.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/code/defmacro.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/code/defmacro.lisp
</span><span style="color: #aaaaaa">@@ -151,7 +151,12 @@
</span> (not (and (listp ,arg-list-name)
(eq 'funcall (car ,arg-list-name)))))
`(progn
- (setf ,arg-list-name (cdr ,arg-list-name)))))
<span style="color: #000000;background-color: #ddffdd">+ (setf ,arg-list-name
+ ;; Handle the case (funcall #'foo args)
+ (if (consp (second ,arg-list-name))
+ (list* (second (second ,arg-list-name))
+ (cddr ,arg-list-name))
+ (cdr ,arg-list-name))))))
</span> (push-let-binding (car rest-of-args) arg-list-name nil))
((and (cdr rest-of-args) (consp (cadr rest-of-args)))
(pop rest-of-args)
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/c961673a4b7bdceeff80cd5ca5739746333aee3f#diff-1'>
<strong>
tests/issues.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- /dev/null
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/issues.lisp
</span><span style="color: #aaaaaa">@@ -0,0 +1,25 @@
</span><span style="color: #000000;background-color: #ddffdd">+;;; Tests from gitlab issues
+
+(defpackage :issues-tests
+ (:use :cl :lisp-unit))
+
+(in-package "ISSUES-TESTS")
+
+(defun square (x)
+ (expt x 2))
+
+(define-compiler-macro square (&whole form arg)
+ (declare (ignore arg))
+ form)
+
+(define-test issue.1.a
+ (:tag :issues)
+ (assert-equal
+ '(square x)
+ (funcall (compiler-macro-function 'square) '(square x) nil)))
+
+(define-test issue.1.b
+ (:tag :issues)
+ (assert-equal
+ '(square x)
+ (funcall (compiler-macro-function 'square) '(funcall #'square x) nil)))
</span></code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/c961673a4b7bdceeff80cd5ca5739746333aee3f">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.common-lisp.net/cmucl/cmucl/commit/c961673a4b7bdceeff80cd5ca5739746333aee3f"}}</script>
</p>
</div>
</body>
</html>