In Forth: compile = generate code.
HolonTForth uses a simple principle: Every word compiles itself. This is equivalent to the Tcl way of passing control to the commands. The compile action is stored in the field compcode in the database record of the word. The compiler/interpreter takes the next word from the source and passes control to the word.
Proc, Code, Colon
A normal executable word appends a call to itself in the generated Tcl code, it adds its name and a closing ";".
Example: dup appends " dup ; "
The object parses the following word in the source, and checks if it is a message. If it is, fetches the method in its type array (the object sees its type in the type field in its database record). Else, if no message, uses the default message ().
The action of the compiler words is also defined in the _Forth system module. For example, the flow control words build a corresponding Tcl flow structure, etc.
HolonTForth shows the compiled code for the current word in the separate code window, for inspection and debugging.