[Python-Dev] Global name lookup schemes
Ka-Ping Yee
ping@lfw.org
Sun, 17 Feb 2002 22:27:02 -0600 (CST)
Okay, i spent another afternoon drawing silly pictures full
of boxes and arrows. I swear, i'm going to be seeing pointers
in my dreams tonight.
Here are figures representing my current understanding of the
various schemes on the table:
Jeremy 1: the dlict scheme
http://lfw.org/python/jeremy1.gif
http://lfw.org/python/jeremy1.tif
http://lfw.org/python/jeremy1.ai
Jeremy, i think i'm still somewhat unclear -- notice the
two question marks in the figure. What kind of animal
is the cache? I assumed that the invalidation info lives
in an array parallel to the dlict's array. Is this right?
Guido 1: the original cellptr/objptr scheme
http://lfw.org/python/guido1.gif
http://lfw.org/python/guido1.tif
http://lfw.org/python/guido1.ai
Ping 1: guido1 + a tweak to always use two dereferencing steps
http://lfw.org/python/ping1.gif
http://lfw.org/python/ping1.tif
http://lfw.org/python/ping1.ai
Tim 1: timdicts and cells with shadow flags
http://lfw.org/python/tim1.gif
http://lfw.org/python/tim1.tif
http://lfw.org/python/tim1.ai
GIFs are small versions, TIFs are big versions, AIs are
Adobe Illustrator source files.
Please examine, send me corrections, discuss, enjoy... :)
Still to do:
Guido 2: the globals_vector scheme
Skip 1: the global-tracking scheme
(I don't actually know yet what in this diagram
would be different from the way things work today.
Statically, Skip's picture is mostly the same;
it's the runtime behaviour that's different.
Still, it's probably good to have a reference
picture of today's data structures anyway.)
-- ?!ng