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
9ffd018c
Commit
9ffd018c
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added pointer< and pointer> as functions and changed uses of %primitive
to them instead.
parent
703c427d
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/alieneval.lisp
+14
-4
14 additions, 4 deletions
code/alieneval.lisp
with
14 additions
and
4 deletions
code/alieneval.lisp
+
14
−
4
View file @
9ffd018c
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/alieneval.lisp,v 1.1.1.1
3
1990/0
5/26 22:55:36
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/alieneval.lisp,v 1.1.1.1
4
1990/0
6/02 16:10:04
wlott Exp $
;;;
;;; This file contains any the part of the Alien implementation that
;;; is not part of the compiler.
...
...
@@ -67,6 +67,16 @@
#+
new-compiler
(
progn
(
defun
pointer<
(
x
y
)
"Return T iff the SAP X points to a smaller address then the SAP Y."
(
declare
(
type
system-area-pointer
x
y
))
(
pointer<
x
y
))
(
defun
pointer>
(
x
y
)
"Return T iff the SAP X points to a larger address then the SAP Y."
(
declare
(
type
system-area-pointer
x
y
))
(
pointer>
x
y
))
(
defun
sap+
(
sap
offset
)
"Return a new sap OFFSET bytes from SAP."
(
declare
(
type
system-area-pointer
sap
)
...
...
@@ -337,7 +347,7 @@
(
lognot
(
1-
(
truncate
alien-alignment
alien-address-unit
)))))
(
new
(
sap+
*current-alien-free-pointer*
bytes
)))
(
when
(
%primitive
pointer>
new
alien-allocation-end
)
(
when
(
pointer>
new
alien-allocation-end
)
(
error
"Not enough room to allocate a ~D bit alien."
bits
))
(
setq
*current-alien-free-pointer*
new
)
alien
))
...
...
@@ -417,8 +427,8 @@
"Release the storage allocated for Alien."
(
check-type
alien
alien-value
)
(
let
((
address
(
alien-value-sap
alien
)))
(
unless
(
not
(
or
(
%primitive
pointer<
address
system-space-start
)
(
%primitive
pointer>
address
alien-allocation-end
)))
(
unless
(
not
(
or
(
pointer<
address
system-space-start
)
(
pointer>
address
alien-allocation-end
)))
(
gr-call
mach:vm_deallocate
*task-self*
address
(
logand
#x-200
(
ash
(
+
(
alien-value-size
alien
)
#xFFF
)
(
-
alien-address-shift
)))))))
...
...
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