projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.6.12.13:
[sbcl.git]
/
src
/
code
/
target-alieneval.lisp
diff --git
a/src/code/target-alieneval.lisp
b/src/code/target-alieneval.lisp
index
8665ecf
..
091841f
100644
(file)
--- a/
src/code/target-alieneval.lisp
+++ b/
src/code/target-alieneval.lisp
@@
-12,8
+12,7
@@
(in-package "SB!ALIEN")
(in-package "SB!ALIEN")
-(file-comment
- "$Header$")
+(/show0 "target-alieneval.lisp 15")
\f
;;;; alien variables
\f
;;;; alien variables
@@
-159,8
+158,6
@@
\f
;;;; runtime C values that don't correspond directly to Lisp types
\f
;;;; runtime C values that don't correspond directly to Lisp types
-;;; ALIEN-VALUE
-;;;
;;; Note: The DEFSTRUCT for ALIEN-VALUE lives in a separate file
;;; 'cause it has to be real early in the cold-load order.
#!-sb-fluid (declaim (freeze-type alien-value))
;;; Note: The DEFSTRUCT for ALIEN-VALUE lives in a separate file
;;; 'cause it has to be real early in the cold-load order.
#!-sb-fluid (declaim (freeze-type alien-value))
@@
-245,15
+242,16
@@
;;; system area pointer to it.
#!-sb-fluid (declaim (inline %make-alien))
(defun %make-alien (bits)
;;; system area pointer to it.
#!-sb-fluid (declaim (inline %make-alien))
(defun %make-alien (bits)
- (declare (type sb!kernel:index bits) (optimize-interface (safety 2)))
- (alien-funcall (extern-alien "malloc" (function system-area-pointer unsigned))
- (ash (the sb!kernel:index (+ bits 7)) -3)))
+ (declare (type index bits))
+ (alien-funcall (extern-alien "malloc"
+ (function system-area-pointer unsigned))
+ (ash (the index (+ bits 7)) -3)))
#!-sb-fluid (declaim (inline free-alien))
(defun free-alien (alien)
#!+sb-doc
"Dispose of the storage pointed to by ALIEN. ALIEN must have been allocated
#!-sb-fluid (declaim (inline free-alien))
(defun free-alien (alien)
#!+sb-doc
"Dispose of the storage pointed to by ALIEN. ALIEN must have been allocated
- by MAKE-ALIEN or ``malloc''."
+ by MAKE-ALIEN or malloc(3)."
(alien-funcall (extern-alien "free" (function (values) system-area-pointer))
(alien-sap alien))
nil)
(alien-funcall (extern-alien "free" (function (values) system-area-pointer))
(alien-sap alien))
nil)
@@
-322,8
+320,9
@@
\f
;;;; the DEREF operator
\f
;;;; the DEREF operator
-;;; Does most of the work of the different DEREF methods. Returns two values:
-;;; the type and the offset (in bits) of the refered to alien.
+;;; This function does most of the work of the different DEREF
+;;; methods. It returns two values: the type and the offset (in bits)
+;;; of the referred-to alien.
(defun deref-guts (alien indices)
(declare (type alien-value alien)
(type list indices)
(defun deref-guts (alien indices)
(declare (type alien-value alien)
(type list indices)
@@
-484,7
+483,7
@@
(defun %cast (alien target-type)
(declare (type alien-value alien)
(type alien-type target-type)
(defun %cast (alien target-type)
(declare (type alien-value alien)
(type alien-type target-type)
- (optimize-interface (safety 2))
+ (optimize (safety 2))
(optimize (inhibit-warnings 3)))
(if (or (alien-pointer-type-p target-type)
(alien-array-type-p target-type)
(optimize (inhibit-warnings 3)))
(if (or (alien-pointer-type-p target-type)
(alien-array-type-p target-type)
@@
-562,7
+561,7
@@
(unless stub
(setf stub
(let ((fun (gensym))
(unless stub
(setf stub
(let ((fun (gensym))
- (parms (loop repeat (length args) collect (gensym))))
+ (parms (make-gensym-list (length args))))
(compile nil
`(lambda (,fun ,@parms)
(declare (type (alien ,type) ,fun))
(compile nil
`(lambda (,fun ,@parms)
(declare (type (alien ,type) ,fun))
@@
-643,10
+642,9
@@
:extern ,alien-name)
,@(alien-vars))
,(if (alien-values-type-p result-type)
:extern ,alien-name)
,@(alien-vars))
,(if (alien-values-type-p result-type)
- (let ((temps (loop
- repeat (length (alien-values-type-values
- result-type))
- collect (gensym))))
+ (let ((temps (make-gensym-list
+ (length
+ (alien-values-type-values result-type)))))
`(multiple-value-bind ,temps
(alien-funcall ,lisp-name ,@(alien-args))
(values ,@temps ,@(results))))
`(multiple-value-bind ,temps
(alien-funcall ,lisp-name ,@(alien-args))
(values ,@temps ,@(results))))