summaryrefslogtreecommitdiffstats
path: root/Objects/object_layout_312.gv
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-08-23 12:55:43 (GMT)
committerGitHub <noreply@github.com>2022-08-23 12:55:43 (GMT)
commit575f8880bf8498ee05a8e197fc2ed85db6880361 (patch)
tree3151c134f888db262db31aa115d052a3ba3f8abb /Objects/object_layout_312.gv
parent16ebae4cd4029205d932751f26c719c6cb8a6e92 (diff)
downloadcpython-575f8880bf8498ee05a8e197fc2ed85db6880361.zip
cpython-575f8880bf8498ee05a8e197fc2ed85db6880361.tar.gz
cpython-575f8880bf8498ee05a8e197fc2ed85db6880361.tar.bz2
GH-96068: Document object layout (GH-96069)
Diffstat (limited to 'Objects/object_layout_312.gv')
-rw-r--r--Objects/object_layout_312.gv50
1 files changed, 50 insertions, 0 deletions
diff --git a/Objects/object_layout_312.gv b/Objects/object_layout_312.gv
new file mode 100644
index 0000000..c0068d7
--- /dev/null
+++ b/Objects/object_layout_312.gv
@@ -0,0 +1,50 @@
+digraph ideal {
+
+ rankdir = "LR"
+
+
+ object [
+ shape = none
+ label = <<table border="0" cellspacing="0">
+ <tr><td><b>object</b></td></tr>
+ <tr><td port="w" border="1">weakrefs</td></tr>
+ <tr><td port="dv" border="1">dict or values</td></tr>
+ <tr><td border="1" >GC info 0</td></tr>
+ <tr><td border="1" >GC info 1</td></tr>
+ <tr><td port="r" border="1" >refcount</td></tr>
+ <tr><td port="h" border="1" >__class__</td></tr>
+ </table>>
+ ]
+
+ values [
+ shape = none
+ label = <<table border="0" cellspacing="0">
+ <tr><td><b>values</b></td></tr>
+ <tr><td port="0" border="1">values[0]</td></tr>
+ <tr><td border="1">values[1]</td></tr>
+ <tr><td border="1">...</td></tr>
+ </table>>
+
+ ]
+
+ class [
+ shape = none
+ label = <<table border="0" cellspacing="0">
+ <tr><td><b>class</b></td></tr>
+ <tr><td port="head" bgcolor="lightgreen" border="1">...</td></tr>
+ <tr><td border="1" bgcolor="lightgreen">dict_offset</td></tr>
+ <tr><td border="1" bgcolor="lightgreen">...</td></tr>
+ <tr><td port="k" border="1" bgcolor="lightgreen">cached_keys</td></tr>
+ </table>>
+ ]
+
+ keys [label = "dictionary keys"; fillcolor="lightgreen"; style="filled"]
+ NULL [ label = " NULL"; shape="plain"]
+ object:w -> NULL
+ object:h -> class:head
+ object:dv -> values:0
+ class:k -> keys
+
+ oop [ label = "pointer"; shape="plain"]
+ oop -> object:r
+}