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
2f5f5910
Commit
2f5f5910
authored
31 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added rudimentary support for funcallable-instances.
parent
3e6d724b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/describe.lisp
+8
-4
8 additions, 4 deletions
code/describe.lisp
code/tty-inspect.lisp
+9
-7
9 additions, 7 deletions
code/tty-inspect.lisp
with
17 additions
and
11 deletions
code/describe.lisp
+
8
−
4
View file @
2f5f5910
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.2
3
1993/0
2
/2
6
0
8:25:09 ram
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.2
4
1993/0
5
/2
9
0
7:00:59 wlott
Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -139,12 +139,12 @@
...
@@ -139,12 +139,12 @@
(
defun
default-describe
(
x
)
(
defun
default-describe
(
x
)
(
format
t
"~&~S is a ~S."
x
(
type-of
x
)))
(
format
t
"~&~S is a ~S."
x
(
type-of
x
)))
(
defun
describe-instance
(
x
)
(
defun
describe-instance
(
x
&optional
(
kind
:structure
)
)
(
cond
((
and
(
fboundp
'pcl::std-instance-p
)
(
cond
((
and
(
fboundp
'pcl::std-instance-p
)
(
pcl::std-instance-p
x
))
(
pcl::std-instance-p
x
))
(
pcl::describe-object
x
*standard-output*
))
(
pcl::describe-object
x
*standard-output*
))
(
t
(
t
(
format
t
"~&~S is a
structure
of type ~A."
x
(
type-of
x
))
(
format
t
"~&~S is a
~(~A~)
of type ~A."
x
kind
(
type-of
x
))
(
dolist
(
slot
(
cddr
(
inspect::describe-parts
x
)))
(
dolist
(
slot
(
cddr
(
inspect::describe-parts
x
)))
(
format
t
"~%~A: ~S."
(
car
slot
)
(
cdr
slot
))))))
(
format
t
"~%~A: ~S."
(
car
slot
)
(
cdr
slot
))))))
...
@@ -317,6 +317,10 @@
...
@@ -317,6 +317,10 @@
(
print-compiled-from
x
))
(
print-compiled-from
x
))
(
defun
describe-funcallabe-instance
(
fin
)
(
describe-instance
fin
:funcallable-instance
))
;;; DESCRIBE-FUNCTION -- Internal
;;; DESCRIBE-FUNCTION -- Internal
;;;
;;;
;;; Describe a function with the specified kind and name. The latter
;;; Describe a function with the specified kind and name. The latter
...
@@ -344,7 +348,7 @@
...
@@ -344,7 +348,7 @@
((
#.
vm:function-header-type
#.
vm:closure-function-header-type
)
((
#.
vm:function-header-type
#.
vm:closure-function-header-type
)
(
describe-function-compiled
x
kind
name
))
(
describe-function-compiled
x
kind
name
))
(
#.
vm:funcallable-instance-header-type
(
#.
vm:funcallable-instance-header-type
(
pcl::
describe-
object
x
*standard-output*
))
(
describe-
funcallabe-instance
x
))
(
t
(
t
(
format
t
"~&It is an unknown type of function."
))))
(
format
t
"~&It is an unknown type of function."
))))
...
...
This diff is collapsed.
Click to expand it.
code/tty-inspect.lisp
+
9
−
7
View file @
2f5f5910
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.1
2
1993/0
2
/2
6
0
8:26:20 ram
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.1
3
1993/0
5
/2
9
0
7:01:10 wlott
Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -149,8 +149,11 @@
...
@@ -149,8 +149,11 @@
(
defun
describe-parts
(
object
)
(
defun
describe-parts
(
object
)
(
typecase
object
(
typecase
object
(
symbol
(
describe-symbol-parts
object
))
(
symbol
(
describe-symbol-parts
object
))
(
instance
(
describe-instance-parts
object
))
(
instance
(
describe-instance-parts
object
:structure
))
(
function
(
describe-function-parts
object
))
(
function
(
if
(
kernel:funcallable-instance-p
object
)
(
describe-instance-parts
object
:funcallabe-instance
)
(
describe-function-parts
object
)))
(
vector
(
describe-vector-parts
object
))
(
vector
(
describe-vector-parts
object
))
(
array
(
describe-array-parts
object
))
(
array
(
describe-array-parts
object
))
(
cons
(
describe-cons-parts
object
))
(
cons
(
describe-cons-parts
object
))
...
@@ -167,11 +170,10 @@
...
@@ -167,11 +170,10 @@
(
cons
"Plist"
(
symbol-plist
object
))
(
cons
"Plist"
(
symbol-plist
object
))
(
cons
"Package"
(
symbol-package
object
))))
(
cons
"Package"
(
symbol-package
object
))))
(
defun
describe-instance-parts
(
object
)
(
defun
describe-instance-parts
(
object
kind
)
(
let
((
dd-slots
(
let
((
dd-slots
(
dd-slots
(
layout-info
(
kernel:layout-of
object
))))
(
dd-slots
(
layout-info
(
%instance-layout
object
))))
(
parts-list
()))
(
parts-list
()))
(
push
(
format
nil
"~s is a
structure
.~%"
object
)
parts-list
)
(
push
(
format
nil
"~s is a
~(~A~)
.~%"
object
kind
)
parts-list
)
(
push
t
parts-list
)
(
push
t
parts-list
)
(
dolist
(
dd-slot
dd-slots
(
nreverse
parts-list
))
(
dolist
(
dd-slot
dd-slots
(
nreverse
parts-list
))
(
push
(
cons
(
dsd-%name
dd-slot
)
(
push
(
cons
(
dsd-%name
dd-slot
)
...
...
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