diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-11-29 15:37:04 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-11-29 15:37:04 -0600 |
commit | f54faf130e4a1f6fb75eba1634bb07a9adc038a6 (patch) | |
tree | c9360513bc5edbc5df0ad4f23875ccf32030d64e /README.txt | |
parent | b3149099a17d392289db9699b5b5d83444d25173 (diff) |
Diffstat (limited to 'README.txt')
-rw-r--r-- | README.txt | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -216,3 +216,37 @@ │ │ │ iv. Does interleaving all three passes improve performance? │ ╰──────────────────────────────────────────────────────────────────────────────╯ + +╭──────────────────────────────────────────────────────────────────────────────╮ +│ The Meta-Object Protocol (i.e., the scary parts of the object system) │ +╞══════════════════════════════════════════════════════════════════════════════╡ +│ The object system supports a meta-object protocol inspired by the original │ +│ MOP as implemented in most Common Lisp implementations, but with a few parts │ +│ cleaned up and simplified. │ +│ │ +│ The pre-defined classes are either BUILTIN-CLASSes or STANDARD-CLASSes. The │ +│ main difference between the two is that only STANDARD-CLASSes have a slots │ +│ array. STANDARD-CLASS may be subclassed, allowing user-defined metaclasses │ +│ to be defined. BUILTIN-CLASS may not be subclassed. │ +│ │ +│ The class hierarchy for pre-defined classes is as follows: │ +│ │ +│ t │ +│ ┌───────────────────┴────────────────┐ │ +│ builtin-object │ │ +│ ┌────┬───┬─────────┬──────┬─────┼───────────────┐ │ │ +│ integer │ symbol sequence │ character hashtable │ │ +│ ┌──┴──┐ └──┐│ ┌──┴──┐ │ ┌───────┴───────┐ │ │ +│ bignum fixnum ││ list vector └─────┐ hashtable-eq hashtable-equal │ │ +│ ┌───────┬───┘└──┐┌─┴──┐ └┬───… │ │ │ +│ method package null cons string function │ │ +│ ┌─────────────────┬────────┴───────┬─────────────────┐ │ │ +│ builtin-function compiled-function generic-function threaded-function │ │ +│ │ │ +│ ┌─────────────────────────────────────┘ │ +│ standard-object │ +│ ┌─────────────────────┬─┴────────────────────┐ │ +│ class direct-slot-definition effective-slot-definition │ +│ ┌──────┴──────┐ │ +│ builtin-class standard-class │ +╰──────────────────────────────────────────────────────────────────────────────╯ |