Greetings! FYI, am out of the office in about an hour for one week.
Robert Boyer <[EMAIL PROTECTED]> writes: > Hi. Got your message about inlining. Just have little to say on the > topic. When to inline is a very deep problem that has been little > explored as far as I know, and that means little. The fact that it can > now be done in GCL 2.7.0, because the sources are kept around, is > fabulous. Great! I have it working in preliminary fashion, but not quite yet ready to commit. Current diff is saved in my home on elgin, gcl.cvs.diff, just in case some computer malfunctions in my absense. The advantage is the simplicity -- the function definition itself provides both its own 'inlining/expanding macro, as well as its type-propagator function. There are all sorts of things we can do here, like generating type propagators automatically. These are functions which further restrict the output type given a subset of the allowed input types. Effectively, these results can simply be cached by the compiler for standard functions and used even when the function is not inlined for critical type propagation. Bootstrapping takes longer, as basic functions like length are initially defined in lisp, etc. The key to making this useful was a narrowing of the type system to support `(eql ,foo) types. remove, for example, is now defined to test if its test is the standard 'eq 'eql, etc. at the beginning of the loop, and switch to an inlined version if so. GCL's compiler before could not propagate this information when inlining even when the test was explicitly supplied as :test 'eq. Now even when it is absent, the test test logic is ommited once the command line parameters are given, making the inline worthwhile. We are at the brink of reverse type proapagation at safety 0. As a preliminary step, check-type is handled specially when at the top of a declaration form (right beneath the declarations). This automatically proclaims the argument type of the function for future use in reverse type propagation, and at safety 0, effectively becomes a declare, so that a safety one calling the check-type when inlined at safety 0 proceeds without it. With these tools in hand, we can handle our mapcar and member inlines in this way too. The earlier way was a cumbersome reimplementation of the function logic as a compiler macro, and pulling out the constant :test arguments for special tratment by hand. Hope to finalize this when I return in one week. > > A first step, it seems to me, is simply to assure that the commands > 'inline' and 'notinline' really work as ANSI says. Even that looks > complicated to me. See below. > Indeed. Take care, -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gcl-devel