| 422 | | (if slot-name ; NIL for slots which are not restored because of schema changes |
|---|
| 423 | | (restart-case |
|---|
| 424 | | (let ((*current-object-slot* (list object slot-name)) |
|---|
| 425 | | (*current-slot-relaxed-p* (or (null object) |
|---|
| 426 | | (store-object-relaxed-object-reference-p object slot-name)))) |
|---|
| 427 | | (let ((value (decode stream))) |
|---|
| 428 | | (when object |
|---|
| 429 | | (let ((bknr.indices::*indices-remove-p* nil)) |
|---|
| 430 | | (if (eq value 'unbound) |
|---|
| 431 | | (slot-makunbound object slot-name) |
|---|
| 432 | | (setf (slot-value object slot-name) value)))))) |
|---|
| 433 | | (set-slot-nil () |
|---|
| 434 | | :report "Set slot to NIL." |
|---|
| 435 | | (setf (slot-value object slot-name) nil)) |
|---|
| 436 | | (make-slot-unbound () |
|---|
| 437 | | :report "Make slot unbound." |
|---|
| 438 | | (slot-makunbound object slot-name))) |
|---|
| 439 | | (decode stream)))) ; read and ignore value |
|---|
| | 431 | (let ((value (decode stream))) |
|---|
| | 432 | (cond |
|---|
| | 433 | ((consp slot-name) |
|---|
| | 434 | (assert (eq 'convert-slot-values (car slot-name))) |
|---|
| | 435 | (convert-slot-value-while-restoring object (cdr slot-name) value)) |
|---|
| | 436 | ((null slot-name) |
|---|
| | 437 | ;; ignore value |
|---|
| | 438 | ) |
|---|
| | 439 | (t |
|---|
| | 440 | (restart-case |
|---|
| | 441 | (let ((*current-object-slot* (list object slot-name)) |
|---|
| | 442 | (*current-slot-relaxed-p* (or (null object) |
|---|
| | 443 | (store-object-relaxed-object-reference-p object slot-name)))) |
|---|
| | 444 | (when object |
|---|
| | 445 | (let ((bknr.indices::*indices-remove-p* nil)) |
|---|
| | 446 | (if (eq value 'unbound) |
|---|
| | 447 | (slot-makunbound object slot-name) |
|---|
| | 448 | (if (slot-boundp object slot-name) |
|---|
| | 449 | (convert-slot-value-while-restoring object slot-name value) |
|---|
| | 450 | (setf (slot-value object slot-name) value)))))) |
|---|
| | 451 | (set-slot-nil () |
|---|
| | 452 | :report "Set slot to NIL." |
|---|
| | 453 | (setf (slot-value object slot-name) nil)) |
|---|
| | 454 | (make-slot-unbound () |
|---|
| | 455 | :report "Make slot unbound." |
|---|
| | 456 | (slot-makunbound object slot-name)))))))) |
|---|
| 499 | | ;; This is actually called in two contexts, when a slot-value is to be filled with a reference to a store object |
|---|
| 500 | | ;; and when a list of store objects is read from the transaction log (%decode-list). In the former case, references |
|---|
| 501 | | ;; two deleted objects are accepted when the slot pointing to the object is marked as being a "relaxed-object-reference", |
|---|
| 502 | | ;; in the latter case, no such information is available. To ensure maximum restorability of transaction logs, object |
|---|
| 503 | | ;; references stored in lists are always considered to be relaxed references, which means that references to deleted |
|---|
| 504 | | ;; objects are restored as NIL. Applications must be prepared to cope with NIL entries in such object lists (usually |
|---|
| | 516 | ;; This is actually called in two contexts, when a slot-value is to |
|---|
| | 517 | ;; be filled with a reference to a store object and when a list of |
|---|
| | 518 | ;; store objects is read from the transaction log (%decode-list). |
|---|
| | 519 | ;; In the former case, references two deleted objects are accepted |
|---|
| | 520 | ;; when the slot pointing to the object is marked as being a |
|---|
| | 521 | ;; "relaxed-object-reference", in the latter case, no such |
|---|
| | 522 | ;; information is available. To ensure maximum restorability of |
|---|
| | 523 | ;; transaction logs, object references stored in lists are always |
|---|
| | 524 | ;; considered to be relaxed references, which means that references |
|---|
| | 525 | ;; to deleted objects are restored as NIL. Applications must be |
|---|
| | 526 | ;; prepared to cope with NIL entries in such object lists (usually |
|---|