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
4fdb5b61
Commit
4fdb5b61
authored
15 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
COMPILE will now update the macro-function if the specified name names
a macro. Previously, the fdefinition of NAME was set.
parent
ffbf426f
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
compiler/main.lisp
+15
-7
15 additions, 7 deletions
compiler/main.lisp
with
15 additions
and
7 deletions
compiler/main.lisp
+
15
−
7
View file @
4fdb5b61
...
...
@@ -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/compiler/main.lisp,v 1.15
0
2010/03/1
4
14:
5
1:2
1
rtoy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.15
1
2010/03/1
6
14:1
3
:2
4
rtoy Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -1930,11 +1930,14 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
;;; COMPILE -- Public
;;;
(
defun
compile
(
name
&optional
(
definition
(
fdefinition
name
)))
"Compiles the function whose name is NAME. If DEFINITION is supplied,
it should be a lambda expression that is compiled and then placed in the
function cell of NAME. If NAME is Nil, the compiled code object is
returned."
(
defun
compile
(
name
&optional
(
definition
(
or
(
macro-function
name
)
(
fdefinition
name
))))
"Compiles the function (or macro-function) whose name is NAME. If
DEFINITION is supplied, it should be a lambda expression that is
compiled. IF NAME names a macro, then the compiled expression
replaces the existing macro-function. If NAME names a function, the
compiled expression is placed in the function cell of NAME. If NAME
is Nil, the compiled code object is returned."
(
with-compilation-unit
()
(
with-ir1-namespace
(
let*
((
*backend*
*native-backend*
)
...
...
@@ -1993,6 +1996,8 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
(
find-source-paths
form
0
)
(
let
((
lambda
(
ir1-top-level
form
'
(
original-source-start
0
0
)
t
)))
;; XXX: If NAME is a macro function, do we need to do
;; call COMPILE-FIX-FUNCTION-NAME?
(
compile-fix-function-name
lambda
name
)
(
let*
((
component
(
block-component
(
node-block
(
lambda-bind
lambda
))))
...
...
@@ -2009,7 +2014,10 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
(
return
(
or
name
res
)))
(
fix-core-source-info
*source-info*
*compile-object*
res
)
(
when
name
(
setf
(
fdefinition
name
)
res
))
(
if
(
and
(
symbolp
name
)
(
macro-function
name
))
(
setf
(
macro-function
name
)
res
)
(
setf
(
fdefinition
name
)
res
)))
(
cond
((
or
(
>
*compiler-error-count*
start-errors
)
(
>
*compiler-warning-count*
start-warnings
))
...
...
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