projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.pre7.82:
[sbcl.git]
/
src
/
code
/
target-defstruct.lisp
diff --git
a/src/code/target-defstruct.lisp
b/src/code/target-defstruct.lisp
index
07a3124
..
7e30c7b
100644
(file)
--- a/
src/code/target-defstruct.lisp
+++ b/
src/code/target-defstruct.lisp
@@
-133,6
+133,12
@@
(if (funcallable-instance-p new-value)
(%funcallable-instance-lexenv new-value)
new-value)))
(if (funcallable-instance-p new-value)
(%funcallable-instance-lexenv new-value)
new-value)))
+
+;;; service function for structure constructors
+(defun %make-instance-with-layout (layout)
+ (let ((result (%make-instance (layout-length layout))))
+ (setf (%instance-layout result) layout)
+ result))
\f
;;;; target-only parts of the DEFSTRUCT top-level code
\f
;;;; target-only parts of the DEFSTRUCT top-level code
@@
-257,7
+263,7
@@
(dsd-raw-type (dsd-raw-type dsd)))
#+sb-xc (/show0 "in %NATIVE-SLOT-ACCESSOR-FUNS macroexpanded code")
;; Map over all the possible RAW-TYPEs, compiling
(dsd-raw-type (dsd-raw-type dsd)))
#+sb-xc (/show0 "in %NATIVE-SLOT-ACCESSOR-FUNS macroexpanded code")
;; Map over all the possible RAW-TYPEs, compiling
- ;; a different closure-function for each one, so
+ ;; a different closure function for each one, so
;; that once the COND over RAW-TYPEs happens (at
;; the time closure is allocated) there are no
;; more decisions to be made and things execute
;; that once the COND over RAW-TYPEs happens (at
;; the time closure is allocated) there are no
;; more decisions to be made and things execute