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
e8fb8bb6
Commit
e8fb8bb6
authored
31 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Update FUN-DEFINED-FROM-PATHNAME to understand byte functions.
parent
bb2a1da8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hemlock/rompsite.lisp
+21
-16
21 additions, 16 deletions
hemlock/rompsite.lisp
with
21 additions
and
16 deletions
hemlock/rompsite.lisp
+
21
−
16
View file @
e8fb8bb6
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/rompsite.lisp,v 1.1.1.
29
1993/0
8
/1
9
1
3:57
:5
5
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/rompsite.lisp,v 1.1.1.
30
1993/0
9
/1
4
1
2:18
:5
9
ram Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -709,21 +709,26 @@
;;; not defined in some file, then nil is returned.
;;;
(
defun
fun-defined-from-pathname
(
function
)
"Takes a symbol or function and returns the pathname for the file the function
was defined in. If it was not defined in some file, nil is returned."
(
typecase
function
(
symbol
(
fun-defined-from-pathname
(
fdefinition
function
)))
(
compiled-function
(
let
((
info
(
kernel:%code-debug-info
(
kernel:function-code-header
(
kernel:%function-self
function
)))))
(
when
info
(
let
((
sources
(
c::compiled-debug-info-source
info
)))
(
when
sources
(
let
((
source
(
car
sources
)))
(
when
(
eq
(
c::debug-source-from
source
)
:file
)
(
c::debug-source-name
source
))))))))
(
t
nil
)))
"Takes a symbol or function and returns the pathname for the file the
function was defined in. If it was not defined in some file, nil is
returned."
(
flet
((
frob
(
code
)
(
let
((
info
(
kernel:%code-debug-info
code
)))
(
when
info
(
let
((
sources
(
c::debug-info-source
info
)))
(
when
sources
(
let
((
source
(
car
sources
)))
(
when
(
eq
(
c::debug-source-from
source
)
:file
)
(
c::debug-source-name
source
)))))))))
(
typecase
function
(
symbol
(
fun-defined-from-pathname
(
fdefinition
function
)))
(
kernel:byte-closure
(
fun-defined-from-pathname
(
kernel:byte-closure-function
function
)))
(
kernel:byte-function
(
frob
(
c::byte-function-component
function
)))
(
function
(
frob
(
kernel:function-code-header
(
kernel:%function-self
function
))))
(
t
nil
))))
(
defvar
*editor-describe-stream*
...
...
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