|
From: Donal K. F. <don...@ma...> - 2017-11-12 06:40:13
|
On 11/11/2017 22:54, Kevin Kenny wrote:
> I've done a 'merge --integrate' of the 'expand' branch into trunk.
> Quadcode now understands most uses of {*} and can even do a competent
> job of optimization with some of them.
>
> I might not be doing all that much more quadcode development for a few
> days. In the meantime, let's try to triage what should come next. Are
> we trying next to go to full integration with Tcl's arrays? (I haven't
> thought much about that, but that's the way Donal seems to be
> heading.)
Actually, I've been working on padding out support for as much of Tcl's
bytecode as possible, going broad rather than deep. :-) I've got a list
of operations that remain to be done, and I'm aiming to get at least
something sensible done for the majority of user code, even if the
semantics are not entirely correct. I've got five bytecode ops left to
do and they all touch callframes; e.g., evalStk and exprStk can pretty
much do anything (especially for non-constant inputs) so they're going
to remain expensive, but at least we can have a chance to generate
correct code for them now that we have callframes. The support for [dict
with] is rather more awkward. :-(
I don't think we should plan to do NRE or TclOO (a total of another 10
bytecode ops) in the near future. They both require major surgery to
things both for analysis and for code generation, and will take quite a
while to implement.
In any case, the support for expansion is important and I'm intending to
think more about local arrays (the hack I did simply won't work with
[upvar] about, especially with uncompiled code) so there's that. It'll
probably result in more quadcode operations (or allowing changing the
possible number of arguments to them; I don't know which is better) but
may work. I'll need to have a deeper look. One of the problems is that
we've got typically two input operations (i.e., by LVT index and by
name) and yet three basic implementation strategies: direct, via LVT and
Tcl's irritatingly expensive boxed types, and via full name lookup
(which is pretty much just using Tcl's standard C API).
Also, apologies for not saying much about this recently; I've mostly
been working in my mornings, at times when anyone sensible in the US
would be asleep, and I've kept getting interrupted before I wrote things
up. It happens. :-)
Donal.
|