forked from robert-strandh/SICL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New component containing code for patching environment E5.
- Loading branch information
1 parent
317d6d2
commit f1c74e3
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(cl:in-package #:sicl-boot-phase-8) | ||
|
||
(defun maybe-patch-accessor-method (accessor-method e5) | ||
(flet ((fun (name) | ||
(sicl-genv:fdefinition name e5))) | ||
(unless (typep (funcall (fun 'sicl-clos:method-function) accessor-method) | ||
'sicl-boot::header) | ||
(let* ((slot-definition | ||
(funcall (fun 'sicl-clos:accessor-method-slot-definition) | ||
accessor-method)) | ||
(slot-name | ||
(funcall (fun 'sicl-clos:slot-definition-name) slot-definition))) | ||
(funcall (fun 'reinitialize-instance) | ||
accessor-method | ||
:function | ||
(funcall (fun 'compile) | ||
nil | ||
`(lambda (arguments next-methods) | ||
(declare (ignore next-methods)) | ||
,(if (eq (funcall (fun 'class-of) accessor-method) | ||
(sicl-genv:find-class 'sicl-clos:standard-reader-method e5)) | ||
`(slot-value (car arguments) ',slot-name) | ||
`(setf (slot-value (cadr arguments) ',slot-name) | ||
(car arguments)))))) | ||
(setf (slot-value slot-definition 'sicl-boot::%class) | ||
(sicl-genv:find-class 'sicl-clos:standard-direct-slot-definition e5)))))) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters