Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
6ee2649e
Commit
6ee2649e
authored
19 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Documentation tests, and test that a NOTINLINE declaration inhibits compiler macro expansion
parent
1ac00a8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansi-tests/define-compiler-macro.lsp
+40
-1
40 additions, 1 deletion
ansi-tests/define-compiler-macro.lsp
with
40 additions
and
1 deletion
ansi-tests/define-compiler-macro.lsp
+
40
−
1
View file @
6ee2649e
...
...
@@ -113,5 +113,44 @@
(list (funcall fn arg 'y) arg)))))
t t t t a (z (z 2)) (y (y 2)))
;;; Test of documentation
\ No newline at end of file
(deftest define-compiler-macro.5
(let* ((sym (gensym))
(form `(define-compiler-macro ,sym (x) "DCM.5" x))
(form2 `(defun ,sym (x) "DCM.5-WRONG" x)))
(eval form)
(eval form2)
(or (documentation sym 'compiler-macro) "DCM.5"))
"DCM.5")
(deftest define-compiler-macro.6
(let* ((sym (gensym))
(form `(define-compiler-macro ,sym (x) "DCM.6" x))
(form2 `(defun ,sym (x) "DCM.6-WRONG" x)))
(eval form2)
(eval form)
(or (documentation sym 'compiler-macro) "DCM.6"))
"DCM.6")
;;; NOTINLINE turns off a compiler macro
(deftest define-compiler-macro.7
(let* ((sym (gensym))
(form `(define-compiler-macro ,sym (x y)
(declare (special *x*))
(setf *x* :bad)
`(list ,x ,y)))
(form2 `(defun ,sym (x y) (list x y))))
(eval form)
(eval form2)
(compile sym)
(let ((*x* :good))
(declare (special *x*))
(values
(funcall (compile nil `(lambda (a b)
(declare (notinline ,sym))
(,sym a b)))
5 11)
*x*)))
(5 11) :good)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment