<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/e69992175ccdcd7f895cff99752b809057c615df">e6999217</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2015-06-22T23:08:08Z</i>
</div>
<pre class='commit-message'>Lookup names correctly in COMPILER-MACRO-FUNCTION.
Fix #3.
The lookup for the names was not handling things like (FLET SQUARE
TEST/PRESENT) correctly. Use VALID-FUNCTION-NAME to get the function
name instead of a plain EQUAL test.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/code/eval.lisp
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
tests/issues.lisp
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/e69992175ccdcd7f895cff99752b809057c615df#diff-0'>
<strong>
src/code/eval.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/code/eval.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/code/eval.lisp
</span><span style="color: #aaaaaa">@@ -448,7 +448,8 @@
</span> set with SETF."
(let ((found (and env
(cdr (assoc name (c::lexenv-functions env)
- :test #'equal)))))
<span style="color: #000000;background-color: #ddffdd">+ :key #'(lambda (e)
+ (nth-value 1 (valid-function-name-p e))))))))
</span> (unless (eq (cond ((c::defined-function-p found)
(c::defined-function-inlinep found))
(found :notinline)
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.common-lisp.net/cmucl/cmucl/commit/e69992175ccdcd7f895cff99752b809057c615df#diff-1'>
<strong>
tests/issues.lisp
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/issues.lisp
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/issues.lisp
</span><span style="color: #aaaaaa">@@ -38,3 +38,39 @@
</span> t)
(t ()
nil))))
<span style="color: #000000;background-color: #ddffdd">+
+;; Functions for testing issue-3
+(defun sqr (x)
+ (expt x 2))
+
+(define-compiler-macro sqr (x)
+ `(expt ,x 2))
+
+(eval-when (:compile-toplevel :load-toplevel :execute)
+(defmacro with-square-check (&body body &environment env)
+ (let ((text (if (compiler-macro-function 'sqr env)
+ "Yes"
+ "No")))
+ `(progn
+ (format t "SQUARE compiler macro present: ~A.~%" ,text)
+ ,@body))))
+
+
+(defun test/absent ()
+ (with-square-check
+ (sqr 2)))
+
+(defun test/present ()
+ (flet ((sqr (x)
+ (print (expt x 3))))
+ (with-square-check
+ (sqr 2))))
+
+(define-test issue.3
+ (:tag :issues)
+ (assert-prints "SQUARE compiler macro present: Yes."
+ (test/absent))
+ (assert-prints "SQUARE compiler macro present: No.
+
+8"
+ (test/present)))
</span>\ No newline at end of file
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/e69992175ccdcd7f895cff99752b809057c615df">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/e69992175ccdcd7f895cff99752b809057c615df"}}</script>
</p>
</div>
</body>
</html>