A TempleOS distro for heretics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

77 lines
2.0 KiB

$WW,1$$SP,"",BI=1$
There is a symbol (hash) table for each task. When a sym is not found, the parent task's sym table is checked. All tasks chain back to the $FG,2$Adam$FG$ task.
TempleOS sym tables are implemented with an array of linked-lists. A num is generated from a string by $LK,"HashStr",A="MN:HashStr"$() to index into the array of linked-lists. Multiple strings can generate the same num, so linked-lists are built. Newer entries overshadow older ones.
There are various types of entries. See $LK,"Hash Entry Types",A="MN:HTT_EXPORT_SYS_SYM"$.
$FG,5$Symbol Look-up$FG$ (Used many places including the $LK,"JIT Compiler",A="FF:::/Compiler/Lex.HC,HashFind"$ and $LK,"Loader",A="FF:::/Kernel/KLoad.HC,HashFind"$.)
1) Symbol name is $LK,"hashed",A="MN:SYS_HASH_STR"$ by adding and shifting the ASCII of all chars.
2) $LK,"hash table",A="MN:CHashTable"$->body[] array is indexed.
3) Linked-lst is traversed until match of text and type of entry.
4) If not found, $LK,"hash table",A="MN:CHashTable"$->next table is searched.
Duplicate entries are allowed -- they overshadow old entries.
$FG,5$Address-to-Symbol Look-up$FG$ (Slow because not important. We could use trees.)
1) FunSeg Cache is $LK,"scanned",A="MN:FunSegCacheFind"$.
2) Hash Tables are $LK,"scanned",A="MN:FunSegFind"$.
í0CatH_CbshDog_DogÐBirdZ´pxƒ<EFBFBD>oÊ´Ü>´<@ƒPo
)')?
)?%?
%?%'
%')'
='=?
ÀÐÀ´
ÖÐÖ´
Q'Q?
'?
-'-?
A'A?
'?
&ÐÐ
д
´&´
&´&Ð
:´:Ð
N´NÐ
b´bÐ
v´vÐ
2´2Ð
F´FÐ
Z´ZÐ
´Ð
Ð<EFBFBD>
<EFBFBD><EFBFBD>
<EFBFBD>Ð
ÐÐ
?

?
??À&À3)3<EFBFBD>C