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
135dcc38
Commit
135dcc38
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
369b3ffb
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
code/alieneval.lisp
+30
-26
30 additions, 26 deletions
code/alieneval.lisp
with
30 additions
and
26 deletions
code/alieneval.lisp
+
30
−
26
View file @
135dcc38
...
@@ -477,7 +477,7 @@
...
@@ -477,7 +477,7 @@
;;; by hand.
;;; by hand.
;;;
;;;
(
defun
naturalize-integer
(
signed
sap
offset
size
form
)
(
defun
naturalize-integer
(
signed
sap
offset
size
form
)
(
multiple-value-bind
(
q
r
)
(
truncate
offset
a
ddress
-alignment
)
(
multiple-value-bind
(
q
r
)
(
truncate
offset
a
lien
-alignment
)
(
cond
(
cond
((
and
(
=
size
32
)
(
zerop
r
))
((
and
(
=
size
32
)
(
zerop
r
))
(
if
signed
(
if
signed
...
@@ -785,31 +785,35 @@
...
@@ -785,31 +785,35 @@
(
let
((
n-sap
(
gensym
))
(
let
((
n-sap
(
gensym
))
(
n-offset
(
gensym
))
(
n-offset
(
gensym
))
(
n-size
(
gensym
)))
(
n-size
(
gensym
)))
`
(
%define-alien-access
`
(
progn
',lisp-type
'
(
,
atype
,@
more-types
)
(
%define-alien-access
#'
(
lambda
(
,
n-sap
,
n-offset
,
n-size
,
alien-var
,
kind-var
,
value-var
',lisp-type
'
(
,
atype
,@
more-types
)
,
source-var
)
#'
(
lambda
(
,
n-sap
,
n-offset
,
n-size
,
alien-var
,
kind-var
,
value-var
,@
(
unless
source-p
,
source-var
)
`
((
declare
(
ignore
,
source-var
))))
,@
(
unless
source-p
`
((
declare
(
ignore
,
source-var
))))
(
unless
(
memq
(
mostcar
,
alien-var
)
'
(
,
atype
,@
more-types
))
(
error
"Wrong Alien type ~S, should have been ~S~
(
unless
(
memq
(
mostcar
,
alien-var
)
'
(
,
atype
,@
more-types
))
~{~#[~; or~:;,~] ~S~}."
(
error
"Wrong Alien type ~S, should have been ~S~
,
alien-var
',atype
',more-types
))
~{~#[~; or~:;,~] ~S~}."
,
alien-var
',atype
',more-types
))
(
macrolet
((
with-alien
((
sap
)
(
offset
&key
(
macrolet
((
with-alien
((
sap
)
((
:unit
ounit
)
32
))
(
offset
&key
(
size
&key
((
:unit
ounit
)
32
))
((
:constant
sconst
)
nil
)
(
size
&key
((
:minimum
smin
)
nil
)
((
:constant
sconst
)
nil
)
((
:unit
sunit
)
32
))
((
:minimum
smin
)
nil
)
&body
(
body
decls
))
((
:unit
sunit
)
32
))
(
%with-alien
sap
offset
ounit
&body
(
body
decls
))
size
sconst
smin
sunit
(
%with-alien
sap
offset
ounit
',n-sap
',n-offset
',n-size
size
sconst
smin
sunit
body
decls
)))
',n-sap
',n-offset
',n-size
,@
body
)))))
body
decls
)))
,@
body
)))
#-
new-compile
(
eval-when
(
compile
)
(
clc::clc-mumble
"alien-access ~S compiled.~%"
lisp-type
)))))
(
eval-when
(
compile
load
eval
)
(
eval-when
(
compile
load
eval
)
...
...
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