Greetings! As many may know, GCL autodeclares constant let bindings, and this allows for many optimizations to proceed. We could also autodeclare bindings which are changed, but changed to a subtype of the original type, let alone autodeclaring loop counters after checking loop bounds, etc.
The problem is that I cannot think of a decent algorithm which is not exponential in the let form nesting. I.e., start by setting the variable types to the type of the initializing form in the outermost let, then using these settings, do likewise for all sub-lets, until one hits the setq, at which point one can determine whether the setq preserves the type. Otherwise, mark the type as t (could alternatively iterate with `(or ,type ,setq-type)), and then process the outer let for real. The outermost let is processed twice, the next innermost four times, etc. Anyone know of a better algorithm? I was thinking about just one pass, and building up a network of linked type-setter functions as you go, but this appears too ambitious at present. Take care, -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gcl-devel
