X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-defstruct.lisp;h=7e30c7bf121eca20198238b6a0f7e22a61520903;hb=f43f136f9b3ff6cae501e850fa67b2183317e212;hp=07a312416faecf1e59349a6227f6439de689a75b;hpb=bed279acc9bd04eb1bbf56acb0dcaa3b1acf04f0;p=sbcl.git diff --git a/src/code/target-defstruct.lisp b/src/code/target-defstruct.lisp index 07a3124..7e30c7b 100644 --- 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))) + +;;; service function for structure constructors +(defun %make-instance-with-layout (layout) + (let ((result (%make-instance (layout-length layout)))) + (setf (%instance-layout result) layout) + result)) ;;;; 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 - ;; 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