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
3f527f53
Commit
3f527f53
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Replaced %primitive structure-ref with the magic function structure-ref.
And use structure-length to find the length of a structure.
parent
26795bb1
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/type-boot.lisp
+8
-14
8 additions, 14 deletions
code/type-boot.lisp
with
8 additions
and
14 deletions
code/type-boot.lisp
+
8
−
14
View file @
3f527f53
...
...
@@ -23,17 +23,13 @@
;;; Define this now so that EQUAL works:
;;;
(
defun
pathnamep
(
x
)
(
and
(
structurep
x
)
(
eq
(
%primitive
structure-ref
x
0
)
'pathname
)))
(
and
(
structurep
x
)
(
eq
(
structure-ref
x
0
)
'pathname
)))
;;; Define so that we can test for VOLATILE-INFO-ENVs from the beginning of
;;; initialization.
;;;
(
defun
volatile-info-env-p
(
x
)
(
and
(
structurep
x
)
(
eq
(
%primitive
structure-ref
x
0
)
'volatile-info-env
)))
(
and
(
structurep
x
)
(
eq
(
structure-ref
x
0
)
'volatile-info-env
)))
(
deftype
inlinep
()
...
...
@@ -46,23 +42,21 @@
(
in-package
"KERNEL"
)
(
defun
ctype-p
(
thing
)
(
and
(
structurep
thing
)
(
member
(
%primitive
structure-ref
thing
0
)
(
member
(
structure-ref
thing
0
)
'
(
ctype
hairy-type
named-type
numeric-type
array-type
member-type
structure-type
union-type
args-type
values-type
function-type
))))
(
defun
values-type-p
(
thing
)
(
and
(
structurep
thing
)
(
eq
(
%primitive
structure-ref
thing
0
)
'values-type
)))
(
and
(
structurep
thing
)
(
eq
(
structure-ref
thing
0
)
'values-type
)))
;;; Define this so that we can copy type-class structures before the defstruct
;;; for type-class runs. ### It relies on structures being identical to
;;; simple-vectors so that the length can be extracted from the -1'st slot.
;;; for type-class runs.
;;;
(
defun
copy-type-class
(
tc
)
(
let
((
new
(
make-type-class
)))
(
dotimes
(
i
(
truly-the
index
(
%primitive
structure-ref
tc
-1
)
))
(
dotimes
(
i
(
c::structure-length
tc
))
(
declare
(
type
index
i
))
(
%primitive
structure-
index-set
new
i
(
%primitive
structure-
index-
ref
tc
i
)))
(
setf
(
c::
structure-
ref
new
i
)
(
c::
structure-ref
tc
i
)))
new
))
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