mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-05 00:40:48 -08:00
Allow the user to impose that all slot accesses go through SLOT-VALUE, etc.
This commit is contained in:
parent
4083b63b08
commit
8bbebf02e8
3 changed files with 8 additions and 1 deletions
|
|
@ -88,6 +88,11 @@ ECL 0.9i
|
|||
COMPUTE-SLOTS assign a location to each slot definition that has allocation
|
||||
:INSTANCE or :CLASS.
|
||||
|
||||
- A new defclass option, :optimize-slot-access, which defaults to T, controls
|
||||
whether the slots accessors should address directly the values in the class
|
||||
or use SLOT-VALUE. It should be set to NIL when one intends to redefine the
|
||||
SLOT-*-USING-CLASS methods.
|
||||
|
||||
* Errors fixed:
|
||||
|
||||
- The intermediate output of the compiler is written in the directory in which
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
(defparameter +standard-class-slots+
|
||||
(append +class-slots+
|
||||
'((slot-table :accessor slot-table)
|
||||
(optimize-slot-access :initarg :optimize-slot-access :initform t)
|
||||
(forward)))))
|
||||
|
||||
#.(create-accessors +standard-class-slots+ 'standard-class)
|
||||
|
|
|
|||
|
|
@ -397,7 +397,8 @@ because it contains a reference to the undefined class~% ~A"
|
|||
reader setter)
|
||||
(declare (fixnum index))
|
||||
(if (and (eql (slot-definition-allocation slotd) :instance)
|
||||
(si:fixnump index))
|
||||
(si:fixnump index)
|
||||
(slot-value standard-class 'optimize-slot-access))
|
||||
(setf reader #'(lambda (self)
|
||||
(let ((value (si:instance-ref self index)))
|
||||
(if (si:sl-boundp value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue