On Oct 3, 2005, at 22:57, Will Coleda wrote:
3) Keep a global counter that is incremented whenever a procedure is
created or rename'd. When generating the compiled code, key against
this counter - if it's changed, we must fall back to the interpreted
version. (which, although it starts out with a a call to the compiled
builtin, might have been replaced at that point.).
I don't see the point. Your compiler can emit, e.g.:
"while"(test, body)
You provide an appropriate implementation of a default "while"
function, in your default namespace.
Whenever user code overrides the "while" word ("set while $foo" - or
some such - I dunno Tcl syntax details), you store_global the new
implementation as a compiled function into the same namespace (or as a
lexical).
Done.
Regards.
leo