~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e5e190
)
lib/sod-structs.3: Some clarifications and typesetting fixes.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 17 Sep 2015 17:24:26 +0000
(18:24 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 17 Sep 2015 17:24:26 +0000
(18:24 +0100)
lib/sod-structs.3
patch
|
blob
|
blame
|
history
diff --git
a/lib/sod-structs.3
b/lib/sod-structs.3
index
6aefc9d
..
bc181ee
100644
(file)
--- a/
lib/sod-structs.3
+++ b/
lib/sod-structs.3
@@
-192,11
+192,13
@@
has no direct superclasses,
and
.B SodClass
is its own metaclass.
and
.B SodClass
is its own metaclass.
-It is not possible to define root classes because of circularities:
+It is not possible to define root classes in module files
+because of circularities:
.B SodObject
has
.B SodClass
.B SodObject
has
.B SodClass
-as its metaclass, and
+as its metaclass,
+and
.B SodClass
is a subclass of
.BR SodObject .
.B SodClass
is a subclass of
.BR SodObject .
@@
-546,7
+548,8
@@
and this is followed by corresponding members
.IB a ;
.PP
for each of
.IB a ;
.PP
for each of
-.IR C 's superclasses
+.IR C 's
+superclasses
.IR A
in the same chain in some (unimportant) order.
A `pointer to
.IR A
in the same chain in some (unimportant) order.
A `pointer to
@@
-617,13
+620,17
@@
each
.B ichain
must have as a prefix the
.B ichain
.B ichain
must have as a prefix the
.B ichain
-for each superclass in the same chain,
and
-each slot must be stored in exactly one place.
+for each superclass in the same chain,
+
and
each slot must be stored in exactly one place.
The layout of vtables doesn't have this second requirement:
it doesn't matter that there are
multiple method entry pointers
for the same effective method
as long as they all work correctly.
The layout of vtables doesn't have this second requirement:
it doesn't matter that there are
multiple method entry pointers
for the same effective method
as long as they all work correctly.
+Indeed, it's essential that they do,
+because each chain's method entry function
+will need to apply a different offset to the receiver pointer
+before invoking the effective method.
.PP
A vtable for a class
.I C
.PP
A vtable for a class
.I C
@@
-655,10
+662,8
@@
extern const union \fIC\fB__vtu_\fIh\fB \fIC\fB__vtable_\fIh\fB;
.fi
.PP
The outer layer is a
.fi
.PP
The outer layer is a
-.IP
.B union
.IB C __vtu_ h
.B union
.IB C __vtu_ h
-.PP
containing a member
.IP
.B struct
containing a member
.IP
.B struct
@@
-718,7
+723,7
@@
of
The metaclass
.I R
of
The metaclass
.I R
of
-.I
R O .
+.I
O
is then the
.I root metaclass
of
is then the
.I root metaclass
of
@@
-781,7
+786,7
@@
be the most specific superclass of
in the same chain as
.IR J .
Then, if there is currently no class pointer of type
in the same chain as
.IR J .
Then, if there is currently no class pointer of type
-.I
Q
+.I
R Q ,
then add a member
.RS
.IP
then add a member
.RS
.IP
@@
-825,7
+830,7
@@
If class
.I A
defines any messages,
and there is currently no member
.I A
defines any messages,
and there is currently no member
-.I
a
+.I
R a ,
then add a member
.RS
.IP
then add a member
.RS
.IP