X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fir1tran.lisp;h=f8bb594feb2f09b62b9f81bad075215f71b35ae0;hb=4cacd5df6c36c1815db4f09767017f5b85757ed1;hp=bd62c93c0b2499317c8f81a9f120dd960cae99df;hpb=872175cd9cb5b4966a36d4bd92421cc407a0355b;p=sbcl.git diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index bd62c93..f8bb594 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -82,8 +82,9 @@ (let* ((info (layout-info (or (info :type :compiler-layout (sb!xc:class-name class)) (class-layout class)))) - (accessor (if (listp name) (cadr name) name)) - (slot (find accessor (dd-slots info) :key #'sb!kernel:dsd-accessor)) + (accessor-name (if (listp name) (cadr name) name)) + (slot (find accessor-name (dd-slots info) + :key #'sb!kernel:dsd-accessor-name)) (type (dd-name info)) (slot-type (dsd-type slot))) (unless slot @@ -2243,37 +2244,6 @@ "optimize away possible call to FDEFINITION at runtime" 'thing) -;;; This is a frob that DEFSTRUCT expands into to establish the compiler -;;; semantics. The other code in the expansion and %%COMPILER-DEFSTRUCT do -;;; most of the work, we just clear all of the functions out of -;;; *FREE-FUNCTIONS* to keep things in synch. %%COMPILER-DEFSTRUCT is also -;;; called at load-time. -(def-ir1-translator %compiler-defstruct ((info) start cont :kind :function) - (let* ((info (eval info))) - (%%compiler-defstruct info) - (dolist (slot (dd-slots info)) - (let ((fun (dsd-accessor slot))) - (remhash fun *free-functions*) - (unless (dsd-read-only slot) - (remhash `(setf ,fun) *free-functions*)))) - (remhash (dd-predicate info) *free-functions*) - (remhash (dd-copier info) *free-functions*) - (ir1-convert start cont `(%%compiler-defstruct ',info)))) - -;;; Return the contents of a quoted form. -(defun unquote (x) - (if (and (consp x) - (= 2 (length x)) - (eq 'quote (first x))) - (second x) - (error "not a quoted form"))) - -;;; Don't actually compile anything, instead call the function now. -(def-ir1-translator %compiler-only-defstruct - ((info inherits) start cont :kind :function) - (function-%compiler-only-defstruct (unquote info) (unquote inherits)) - (reference-constant start cont nil)) - ;;;; LET and LET* ;;;; ;;;; (LET and LET* can't be implemented as macros due to the fact that