Will Coleda <[EMAIL PROTECTED]> wrote:
On Aug 6, 2006, at 4:08 PM, Leopold Toetsch wrote: >> invalid_1559: >> .local pmc interactive >> interactive = get_root_global ['tcl'], '$tcl_interactive' > > # you might cache that once - it's probably used in zillion of places > This is a user visible variable that could theoretically change anywhere, so any caching scheme has to take that into account.
It should work to just find this once. Since we (have to) use assign for variables, any changes that happen happen to the actual PMC. So caching this is fine. Also, we can cache the 'tcl' and '_tcl' namespaces to prevent that key lookup when we're looking for globals. I'll look at doing that.
>> unless interactive goto err_command1559 >> .local pmc unk >> unk=find_global '&unknown' > > # same here and just do ... > > 'unknown'(...) > > ... call it instead of ... > >> unk($P1566, $P1560, $P1561, $P1563) > > my 2 c > leo > I'll investigate just using the '&foreach'() syntax in both cases, and there's probably some wins there.
Except this only works when the user is in the root HLL namespace or when the user is executing code in the current namespace. That doesn't mean it's not a valid option; just that it's not always valid. -- Matt Diephouse http://matt.diephouse.com