projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.20.23: get rid of IGNORE-ERRORS in SB-INTROSPECT
[sbcl.git]
/
src
/
code
/
defstruct.lisp
diff --git
a/src/code/defstruct.lisp
b/src/code/defstruct.lisp
index
c757550
..
aac8f2d
100644
(file)
--- a/
src/code/defstruct.lisp
+++ b/
src/code/defstruct.lisp
@@
-310,6
+310,11
@@
:accessor-name '%raw-instance-ref/complex-long
:init-vop 'sb!vm::raw-instance-init/complex-long
:n-words #!+x86 6 #!+sparc 8)))))
:accessor-name '%raw-instance-ref/complex-long
:init-vop 'sb!vm::raw-instance-init/complex-long
:n-words #!+x86 6 #!+sparc 8)))))
+(defun raw-slot-words (type)
+ (let ((rsd (find type *raw-slot-data-list* :key #'raw-slot-data-raw-type)))
+ (if rsd
+ (raw-slot-data-n-words rsd)
+ (error "Invalid raw slot type: ~S" type))))
\f
;;;; the legendary DEFSTRUCT macro itself (both CL:DEFSTRUCT and its
;;;; close personal friend SB!XC:DEFSTRUCT)
\f
;;;; the legendary DEFSTRUCT macro itself (both CL:DEFSTRUCT and its
;;;; close personal friend SB!XC:DEFSTRUCT)
@@
-1516,10
+1521,14
@@
(loop for slot in (dd-slots defstruct)
for name = (dsd-name slot)
collect (cond ((find name (skipped-vars) :test #'string=)
(loop for slot in (dd-slots defstruct)
for name = (dsd-name slot)
collect (cond ((find name (skipped-vars) :test #'string=)
+ ;; CLHS 3.4.6 Boa Lambda Lists
(setf (dsd-safe-p slot) nil)
'.do-not-initialize-slot.)
((or (find (dsd-name slot) (vars) :test #'string=)
(setf (dsd-safe-p slot) nil)
'.do-not-initialize-slot.)
((or (find (dsd-name slot) (vars) :test #'string=)
- (dsd-default slot)))))))))
+ (let ((type (dsd-type slot)))
+ (if (eq t type)
+ (dsd-default slot)
+ `(the ,type ,(dsd-default slot))))))))))))
;;; Grovel the constructor options, and decide what constructors (if
;;; any) to create.
;;; Grovel the constructor options, and decide what constructors (if
;;; any) to create.