vocabs.1

This file contains all the vocabulary creating and control words. It determines the order in which vocabularies will be searched and which vocabularies will and will not be searched. It also defines which vocabulary any newly created definitions will be linked to.

All words within this source file are assembled into the root vocabulary. This vocabulary is the parent of all other vocabularies and as long as it is in context (in the search order) the compiler will have control of said search order. Remove root from context and you lose control of this mechanism.

Due to a limitation with the NASM assemblers macro language, as the kernel sources are assembled, each word created is linked to the first thread of it's parent vocabulary. If NASM had a more powerful macro language we would be able to link each word to the thread associated with said word names hash value. Unfortunately it doesnt (btw the A86 assembler by EJI does :).

This means that I am forced to execute a fixup routine to totally rehash the entire dictionary. This rehash routine breaks each word off of the first thread of it's parent vocabulary and re-attaches it to said vocabulary on the correct hashed thread.

This source file contains this fixup function. Once IsForth is able to metacompile it's own kernel sources the requirement for this Kludge will disappear. So will this kludge.