Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Carl Shapiro
cmucl
Commits
5eda1031
Commit
5eda1031
authored
26 years ago
by
dtc
Browse files
Options
Downloads
Patches
Plain Diff
Add macro-function and special-operator-p check when evaluating a
(function symbol) form. Based on patches from Peter Van Eynde.
parent
b2ccd9ba
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
code/eval.lisp
+20
-6
20 additions, 6 deletions
code/eval.lisp
with
20 additions
and
6 deletions
code/eval.lisp
+
20
−
6
View file @
5eda1031
...
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/eval.lisp,v 1.2
8
199
8/12/19 16:0
0:3
9
dtc Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/eval.lisp,v 1.2
9
199
9/01/09 11:1
0:3
0
dtc Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -179,11 +179,25 @@
:format-control
"Wrong number of args to FUNCTION:~% ~S."
:format-arguments
(
list
exp
)))
(
let
((
name
(
second
exp
)))
(
if
(
or
(
atom
name
)
(
and
(
consp
name
)
(
eq
(
car
name
)
'setf
)))
(
fdefinition
name
)
(
eval:make-interpreted-function
name
))))
(
cond
((
consp
name
)
(
if
(
eq
(
car
name
)
'setf
)
(
fdefinition
name
)
(
eval:make-interpreted-function
name
)))
((
macro-function
name
)
(
error
'simple-type-error
:datum
name
:expected-type
'
(
not
(
satisfies
macro-function
))
:format-control
"~S is a macro."
:format-arguments
(
list
name
)))
((
special-operator-p
name
)
(
error
'simple-type-error
:datum
name
:expected-type
'
(
not
(
satisfies
special-operator-p
))
:format-control
"~S is a special operator."
:format-arguments
(
list
name
)))
(
t
(
fdefinition
name
)))))
(
quote
(
unless
(
=
args
1
)
(
error
'simple-program-error
...
...
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