Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcl lexical failures, PDD20, PDD21

4 views
Skip to first unread message

Will Coleda

unread,
Apr 19, 2006, 1:41:24 PM4/19/06
to Perl 6 Internals
Here's my thought as to why lexicals are now failing in tcl:

When PDD20 hit, tcl was reworked to use .HLL_map of .LexPad
to .DynLexPad, then walked up the lexpad whenever trying to access
lexicals.

When PDD21 hit, I replaced all use of

.namespace [ 'Tcl' ]

with

.HLL 'Tcl', 'tcl_group'
.namespace [ '' ]

To get the *namespace* effect, but: this now removes the HLL lexpad
mapping that was established once at startup, which kills my lexical
support.

So, I need:

.HLL 'Tcl', 'tcl_group'
.HLL_map .LexPad, .DynLexPad
.namespace [ '' ]

Except this doesn't always work since the .DynLexPad isn't loaded by
default, so I really need:

.sub hacky :immediate :anon
P0 = loadlib "dynlexpad"
.end
.HLL 'Tcl', 'tcl_group'
.HLL_map .LexPad, .DynLexPad
.namespace [ '' ]

I can avoid loading the dynlex lib each time, if I'm clever, but then
I have to be clever. Or I could put those six lines into a .Tcl()
macro and apply liberally.

Any thoughts?

Will Coleda

unread,
Apr 19, 2006, 4:33:16 PM4/19/06
to Perl 6 Internals
Excellent.

Matt found an extraneous .HLL that had crept in, breaking the lexpad
stuff. Removed that, all is working. So, apparently, we already
*were* being clever enough, except for one bit of stupid.

Thanks, Matt!

0 new messages