summaryrefslogtreecommitdiffstats
path: root/share
Commit message (Collapse)AuthorAgeFilesLines
...
* stat: support high resolution time stamps.Kaz Kylheku2019-10-291-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * configure (have_sys_stat): New variable. Set to y when our test detects <sys/stat.h>. New test added for the presence of high resolution time stamps in struct stat. If we have these, we #define HAVE_STAT_NSEC 1 in config.h. * share/txr/stdlib/path-test.tl (path-newer): Compare nanosecond parts of the modification time if the seconds are equal, improving the resolution of the test. * sysif.c (atime_nsec_s, mtime_nsec_s, ctime_nsec_s): New symbol variables. (stat_to_struct): If nanosecond resolution is available, set the new nanosecond slots from the three tv_nsec fields in struct stat. Otherwise, set the new slots to zero. (sysif_init): Initialize the new symbol variables. Add the three new slots to the stat struct. * sysif.c (atime_nsec_s, mtime_nsec_s, ctime_nsec_s): Declared. * txr.1: Documented new atime-nsec, mtime-nsec and ctime-nsec slots of stat structure. Added note to path-newer mentioning high resolution support.
* Version 227.txr-227Kaz Kylheku2019-10-261-1/+1
| | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise.
* Version 226.txr-226Kaz Kylheku2019-10-251-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* stdlib: remove unneeded macros from compiled image.Kaz Kylheku2019-10-243-40/+44
| | | | | | | | | | | | | | | | | | A few macros in the library are local; they are needed only inside functions in the same module. This means they are not referenced by anything once those functions are compiled; we should not be carrying the compiled versions of these macros into the image. We wrap these macro definitions with eval-only, telling the compiler not to emit their compiled version into the output file. * share/txr/stdlib/asm.tl (with-lev-idx, defopcode, defopcode-derived): Wrap macro with eval-only. * share/txr/stdlib/compiler.tl (compile-in-toplevel): Likewise. * share/txr/stdlib/path-test.tl (sys:path-test): Likewise.
* New macro: ldo.Kaz Kylheku2019-10-231-0/+3
| | | | | | | | | | This is a left-argument-inserting syntactic sugar for do. * lisplib.c (op_set_entries): Add auto-load entry for ldo. * share/txr/stdlib/op.tl (ldo): New macro. * txr.1: Documented.
* op/do: clean up documentation-implementation problem.Kaz Kylheku2019-10-231-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was reported by astute user vapnik spaknik that the documentation says thing about the do operator which are not actually true in the implementation. I've decided that one of them should be true, and so both implementation and documentation are changing. The documentation claims that (do set x) will produce a function that can be called with one argument; that argument will be assigned to x. That doesn't work, but this commit will make it work. The documentation has this example transformation: (do + foo) -> (lambda rest (+ foo . rest)) that cannot be made to work because do works with macros and special operators to which arguments can't be dynamically applied. This patch will not make the above work; instead the example is corrected. How do is going to work inow is that (do sym ...) syntax in which no implicit variables appear will be equialent to (do sym ... @1). The generated variadic function has one required argument which is implicitly added to the syntax. Obviously, that only works if that positon of the syntax is an evaluated form or place. Values of the -C option equal to 225 or less will restore the old do behavior. * share/txr/stdlib/op.tl (sys:op-expand): Support the new style of do, subject to backward compatibility. A hack is required here. We cannot discover the @1, @2 .. variables in the syntax until we fully expand it. But that code walk requires the syntax to be valid. For instance if (do set x) is specified, with the expectation that it is equivalent to (do set x @1), we cannot process that by code walking (set x). (set x) is invalid syntax. What we do is to *try* expanding it as (set x). If that doesn't work, we add a dummy gensym to the form to produce (set x #:gNNNN) and try expanding that. In that case, rather than adding @1 to the form, we replace the dummy gensym with @1. The algorithm is careful not to accidentally conceal real syntax errors in the form. If the form without the dummy gensym fails to expand, and the one with the dummy gensym expands fine but contains references to implicit parameters (@1, @2, ... @rest), we expand it again without the gensym and allow the error to propagate. Other aspects of this change are fairly trivial. Because the do logic possibly introduces a @1 that doesn't exist, near the end of this function we have to bind another metas variable which has an up-to-date copy of the gens slot. (op-ignerr): New macro; we can't use ignerr because that will create a bootstrapping cycle; ignerr expands to catch, and the catch macro uses do. Wrapping this in eval-only, since we don't need an op-ignerr macro in the compiled image. * txr.1: Documentation revised and updated. Differences between do and op put clarified and put into point form. Bad do examples corrected. Syntax of do now shown as having a required parameter that is an operator. Compat notes added.
* compiler: warn on too many lambda args.Kaz Kylheku2019-10-172-0/+4
| | | | | | | | | * share/txr/stdlib/vm-param.tl (%max-lambda-fixed-args%): New symbol macro. * share/txr/stdlib/compiler.tl (compiler comp-lambda): If the nubmer of fixed parameters exceeds %max-lambda-fixed-args%, then issue a warning.
* tree: node set functions and syntactic places.Kaz Kylheku2019-10-161-0/+9
| | | | | | | | | | | | | | | | | * lisplib.c (defset_set_entries): Autoload entries for left, right and key. * share/txr/stdlib/defset.tl (left, right, key): New simple-form defsets. * tree.c (set_left, set_right, set_key): New functions. (tree_init): Register intrinsics set-left, set-right and set-key. * tree.h (set_left, set_right, set_key): Declared. * txr.1: key, left and right classified as accessors. Documented set-key, set-left and set-right.
* op: new features for anonymous recursion.Kaz Kylheku2019-10-031-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Within the op syntax, the new implicit variable @rec now refers to the function itself. There is also @(rec ...) for calling the function through a function binding. For instance, here is Fibonacci: (do if (> @1 1) (+ @(rec (pred @1)) @(rec (ppred @1))) 1) * share/txr/stdlib/op.tl (sys:op-ctx): New slots rec and recvar. (sys:op-rec-p, sys:op-ensure-rec): New functions. (sys:op-alpha-rename): Check for the new syntaxes and translate to appropriate gensymed expressions, while updating the context structure, so the expander is informed about the @rec or @(rec ...) activity in the expression. (sys:op-expand): Check whether @rec or @(rec ...) has been used in the expression, and generate the necessary variants to support it. We need to bind the lambda to a recursive binding using the same mechanism that labels uses, and possibly to bind the gensym underneat @rec to the value of that function binding. * txr.1: op documentation extended to cover the new feature, plus some wording improvements.
* symbol-function: don't break existing compiled code.Kaz Kylheku2019-10-031-2/+2
| | | | | | | | | | | | | | | | | When a symbol-function form is used as a syntactic place, the generated code makes a run-time call to sys:get-fun-getter-setter. A recent commit changed the interface of this function, which means that such code which has been previously comipled (or somehow retained in macro-expanded form) will break. * share/txr/stdlib/place.tl (sys:get-fun-setter-getter): Change the interface so it's backward compatible with the old one: the first argument is the symbol, like before, and thanks to optional arguments, it can be called with just that argument. (defplace symbol-function): Generate code to call sys:get-fun-setter-getter accordingly.
* symbol-function: support lambda expressions.Kaz Kylheku2019-09-271-2/+6
| | | | | | | | | | | | | | | | | * eval.c (lookup_fun): Check for a lambda expression and return a faked binding containing the interpreted function. (do_eval, op_fun): Remove checks for lambda that are now being done in lookup_fun. In many other places where lookup_fun is used, we still need lambda checks, like in the expander. * share/txr/stdlib/place.tl (sys:get-fun-getter-setter): Take form argument. Diagnose assignments to lambda, and to unknown function place syntax. (defplace symbol-function): Pass sys:*pl-form* to sys:get-fun-getter-setter as form argument. * txr.1: fboundp and symbol-function doc updated.
* stdlib: fix incorrect uses of compile-error.Kaz Kylheku2019-09-274-40/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oops! We have many instances of compile-error being called in the old way with a format string as its first agument, instead of a context argument. * share/txr/stdlib/ifa.tl (ifa): Take :form argument, pass to compile-error. Let's call this "fix M". (sys:if-to-cond): Add form parameter, pass to compile-error. Let's call this let's call this "fix F". (conda, condlet): Fix M. * share/txr/stdlib/place.tl (sys:*pl-form*): New special variable. We need this in order to communicate the real place form to the place expander, similarly to how we communicate the original environment using sys:*pl-env*. (call-update-expander, call-clobber-expander, call-delete-expander): Bind sys:*pl-form* to the unexpanded place. (shift, lset): Fix M. (defplace fun): Arrange for value of sys:*pl-form* to be passed to compile-error. Let's call this "Fix P". (sys:get-mb): Fix F. (defplace symbol-macro): Fix P. (placelet*, placelet): Fix M. * share/txr/stdlib/txr-case.tl (txr-case-impl): Fix M. * share/txr/stdlib/with-resources.tl (with-resources): Fix M.
* op: eliminate useless quasiquote.Kaz Kylheku2019-09-151-1/+1
| | | | | * share/txr/stdlib/op.tl (sys:op-expand): Replace ^(,*args) with just args.
* Version 225.txr-225Kaz Kylheku2019-09-111-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* list-builder: remove wasteful slot accesses.Kaz Kylheku2019-09-101-11/+11
| | | | | | | * share/txr/stdlib/build.tl (list-builder add, list-builder pend, list-builder pend): Refer to previously cached variable holding self.head or self.tail, instead of re-accessing the slot.
* list-builder: simplify circularity check in pend.Kaz Kylheku2019-09-101-4/+1
| | | | | * share/txr/stdlib/build.tl (list-builder pend): Use tailp instead of last and eq.
* tests: add tests for list-builder and fix bug.Kaz Kylheku2019-09-101-1/+1
| | | | | | | * share/txr/stdlib/build.tl (list-buider pend*): Fix typo: apply should be append. Funny, this didn't propagate to ncon*. * tests/012/seq.tl: Some list-builder tests via build macro.
* list-builder: rewrite of basic methods.Kaz Kylheku2019-09-091-38/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewriting be addition, pending and nconcing methods of list-builder to avoid loops and rely on lower list processing functions. This cleans up the semantics and error messages. Some examples of behavioral changes: (build (pend "abc") (add #\d)) now returns "abcd", consistent with (append "abc" '(#\d)). Previously it returned '(#\d). (build (add 1) (pend 2) (pend 3)) now produces a "cannot append to 2" error. Previously it produced "copy: cannot copy object of type fixnum". * share/txr/stdlib/build.tl (list-builder add): Don't use copy-list; rather the idiom for copying a sequence in preparation for appending to it is (append x nil). This will blow up nicely if x is an atom other than nil. We use this trick twice. (list-builder add*): Simplify with append. (pend, pend*, ncon): Rewrite. (ncon*): Use nconc once on a combined argument list: this is borrowed from the rewritten pend*. * txr.1: Documentation updated with clarifications, particularly in the area of the requirements regarding destructive manipulation and substructure sharing.
* list-builder: use copy-list, not copy.Kaz Kylheku2019-09-031-6/+6
| | | | | | | * share/txr/stdlib/build.tl (list-buider add, list-builder add*, list-builder pend, list-builder pend*): Use copy-list rather than copy. This copies terminating atoms without complaining.
* list-builder: bugfix: broken self-appending.Kaz Kylheku2019-09-031-4/+7
| | | | | | | | | | | | | | | | | | | | The list builder is failing on the documented example (build (add 1 2) (pend (get)) (pend (get))) -> (1 2 1 2 1 2 1 2) wrongly constructing an infinite list. * share/txr/stdlib/build.tl (list-builder pend): When destructively appending the next argument, check whether the current tail is a tail of that object. If so, copy the object to prevent a cycle from forming. (list-builder pend*): When appending the old head to the catenated list, do the tail check and copy the object if necessary to prevent the creation of a cycle.
* Version 224.txr-224Kaz Kylheku2019-08-291-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* compiler: mac params: eliminate plen variable.Kaz Kylheku2019-08-291-10/+9
| | | | | | | | * share/txr/stdlib/compiler.tl (expand-bind-mac-params): Remove the plen gensym. We don't need to store the form length in a variable, because the generated length check code references the value exactly once. Let's just propagate that the length calculating expression into that code.
* compiler: elide nil var intializaton.Kaz Kylheku2019-08-281-2/+6
| | | | | | | | | | | | Virtual machine local variables registers don't require nil initialization. In cases when a complex variable initializer is known to return nil, we can elide the move instrution which moves that nil into the register. * share/txr/stdlib/compiler.tl (null-reg): New function. (compiler comp-let): Don't move the value of the output register of the init fragment into the variable, if that register is the null register t0.
* compiler: mac params: simplify optional presence indicators.Kaz Kylheku2019-08-281-15/+21
| | | | | | | | * share/txr/stdlib/compiler.tl (expand-bind-mac-params): Generate better Lisp code when presence indicating variables on optional parameters are not used. It's possible to bind the variable directly, instead of binding to nil and assigning it. The cases are split accordingly.
* compiler: mac params: late allocation for cursors.Kaz Kylheku2019-08-281-68/+69
| | | | | | | | | | | * share/txr/stdlib/compiler.tl (expand-bind-mac-params): Allocate the curs gensym only when about to recurse over a nested parameter list, rather than unconditionally. Otherwise, we always end up allocating one more gensym than we actually use, for a lower nesting level that might not be there. Don't use unwind-protect for returning the cursor variable to the free-list; it makes no sense to be recovering that since any exception will be abandoning this function entirely.
* trace: bugfix: trace-redefine-check doesn't untrace.Kaz Kylheku2019-08-281-3/+3
| | | | | | | * share/txr/stdlib/trace.tl (sys:trace-redefine-check): Move the sys:untrace call before the warning throw. That throw doesn't return; it ends up transferring control to the continue catch, and so the untrace is skipped.
* compiler: bugfix: incorrect scoping in macro param binding.Kaz Kylheku2019-08-281-65/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The destructuring binder binds all of the variables in the template to nil values and then assigns to them as it walks the object that is being destructured. Unfortunately, this results in incorrect treatment of init-forms, which are evaluated in the wrong scope. They are actually evaluated in completely the wrong scope due to the use of up:env, but the problem can't be fixed by removing up:env. The approach here is to generate a big let* construct that binds the variables in sequence, rather than assigning to them. * share/txr/stdlib/compiler.tl (expand-bind-mac-params): The basic structure of the code remains the same, but the details are rewritten. Instead of emitting a body of forms, we emit let* bindings. Because some of the logic requires imperative statements, like stepping pointers through the destructured object, these are mixed into the variable initializations via progn. The local functions emit-stmt and emit-var provide the interface for doing this. There is a bit of trickery in the situation that an optional parameter also has the presence-indicator variable. We must bind the parameter in an environment in which that presence-indicator variable is not yet visible. This is achieved by binding the variable to a nil value, and then binding the presence indicator to an expression which sets the variable's value as a side effect, and yields a Boolean value that initializes the indicator.
* compiler: bugfix: colon keyword bungle in macro params.Kaz Kylheku2019-08-281-9/+7
| | | | | | | | | | | | | | | When the (set arg :) form is processed by a compiled version of the set operator, it blows up with "set: arguments must be pairs". This is because the compiled destructuring code is wrongly trying to apply special treatment to a colon symbol argument to an optional parameter. It is documented that such such treatment only happens in function calls, and not in the binding of macro parameter lists. Interpreted macro param binding gets it right. * share/txr/stdlib/compiler.tl (expand-bind-mac-params): Do not treat a : element in the structure as a missing optional argument, but as an ordinary value.
* compiler: relate mac bind error to right substructure.Kaz Kylheku2019-08-271-1/+1
| | | | | | | | * share/txr/stdlib/compiler.tl (expand-bind-mac-params): A nested destructuring error must be reported against the local parameter list, not the top-level one. The bind-mac-check call muts use the local par-syntax, not the original top-level params.
* compiler: for: bugfix: dangling label reference.Kaz Kylheku2019-08-261-1/+1
| | | | | | | | | | | An infinite for loop in which the test is explicitly given as nil rather than omitted fails to compile. A minimal repro test case for this is (compile-toplevel '(for () (nil) ()))). Spotted this while reading the compiler code. * share/txr/stdlib/compiler.tl (compiler comp-for): Test the test-p variable, not test, to determine whether or not to generate the loop skip label.
* list-builder: inserter methods return nil.Kaz Kylheku2019-08-171-7/+12
| | | | | | | | | * share/txr/stdlib/build.tl (list-builder): Methods add, add*, pend, pend*, ncon and ncon* return nil. * txr.1: Updated documentation to state that these methods return nil, rather than an unspecified return value. Improvements in build macro documentation.
* list-builder: dequeue capabilities with del/del* operators.Kaz Kylheku2019-08-171-5/+45
| | | | | | | | | | | | | | | * lisplib.c (build_set_entries): Add buildn for autload, and intern del and del* symbols. * share/txr/stdlib/build.tl (list-builder): New methods del and del*. (sys:list-builder-flets): Generate flet for del*. (sys:build-expander): New function, consisting of expansion logic previously in build function. Macrolet added for del. (build): Call sys:build-expander. (buildn): New macro. * txr.1: Documented.
* compile-file: include load-time as top-level form.Kaz Kylheku2019-08-161-0/+4
| | | | | | | | | | | | * share/txr/stdlib/compiler.tl (usr:compile-file): recognize sys:load-time-lit as a top-level form and recurse through to compiling its constituent form. We check the flag whether the syntax had already been processed by the evaluator, though that currently cannot possibly happen for a form that has just been parsed from a file by compile-file itself. * txr.1: Defintion of top-level form (from compile-file POV) updated. Documentation of load-time updated.
* Version 223: ten years!txr-223Kaz Kylheku2019-08-141-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* compiler: inline-lambda: optimize constant apply list.Kaz Kylheku2019-08-091-65/+75
| | | | | | | | | | | | | * share/txr/stdlib/compiler.tl (comp-inline-lambda): Pass nil to new argument of lambda-apply-transform, indicating top-level call. (lambda-apply-transform): Takes new argument indicating whether it's a recursive call. If the apply list expression is constant, then it is evaluated and treated as a list of arguments which are then turned into quoted constants individually and passed as fixed args in a recursive call. This eliminates the generation of code dealing with run-time evaluation and destructuring of the apply arguments.
* compiler: inline-lambda: optimize generated let.Kaz Kylheku2019-08-081-3/+8
| | | | | | | | | | * share/txr/stdlib/compiler.tl (lambda-apply-transform): We conditionally generate the outer let as an alet, if there are no shadowing issues. The shadowing test is very conservative: the intersection between the argument expressions and the lambda symbols must be empty. Also, we move the gensym for the apply list expression into the let*, because we need a real storage location that we can pop.
* pop: improve expansion.Kaz Kylheku2019-08-081-1/+1
| | | | | | * share/txr/stdlib/place.tl (pop): Use alet for binding the temporary rather than let, so that if (,getter) expands to a symbol, it will disappear.
* compiler: bugfix: eval order in inline lambda.Kaz Kylheku2019-08-071-52/+54
| | | | | | | | | | | | | | | * share/txr/stdlib/compiler.tl (lambda-apply-transform): The expander fails to observe left-to-right evaluation because if the trailing argument form is present, it is evaluated first, even though it is the last argument. Also, the argument evaluations are wrongly interleaved among the default expressions for optional arguments; they must be evaluated firt. We fix all this by allocating gensyms for all of the fixed argument forms, and binding these via an extra let wrapped around the output let* form. When generating the let* we refer to the gensyms instead of the original fixed arguments. This extra let needs optimizing, but it can't just be converted to an alet because of scoping issues.
* compiler: bugfix: scoping issue in inline lambda.Kaz Kylheku2019-08-071-1/+1
| | | | | | | | * share/txr/stdlib/compiler.tl (lambda-apply-transform): The gensym for binding the trailing argument expression must be bound before any of the parameters, otherwise the expression is exposed to the scope of the parameters that have been emitted so far. We use add* to put it at the front.
* compiler: inline lambda: incomplete opt param support.Kaz Kylheku2019-08-071-9/+20
| | | | | | | | | | | | | | The compilation of lambdas that are immediately called or applied is missing the support for the Boolean parameters that indicate whether optional arguments are present. * share/txr/stdlib/compiler.tl (lambda-apply-transform): Check whether the opt parameter items from the fun-param-parser object have a third element, the indicator variable, and emit the binding for it. This has to be done in all three cases: optional parameter statically present, statically missing, and dynamically determined from run-time apply list of unknown length.
* compiler: remove one-argument or.Kaz Kylheku2019-08-061-1/+1
| | | | | * share/txr/stdlib/compiler.tl (usr:compile-file): Remove useless one-argument use of or operator.
* Version 222.txr-222Kaz Kylheku2019-07-301-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* Version 221.txr-221Kaz Kylheku2019-07-231-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* ffi: two-argument form of sizeof.Kaz Kylheku2019-07-111-2/+6
| | | | | | | | | | | | | | | If sizeof is given an extra argument (an expression which evaluates to an object), it can calculate the dynamic size of the FFI type in relation to representing that object. * ffi.c (dyn_size): New static function. (ffi_init): Register sys:dyn-size intrinsic. * share/txr/stdlib/ffi.tl (sizeof): Support additional argument, avoiding run-time compilation of the type expression with the help of load-time. * txr.1: Update documentation for sizeof macro.
* Version 220.txr-220Kaz Kylheku2019-07-081-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* compile-file: elide top-level atoms.Kaz Kylheku2019-07-071-1/+1
| | | | | | | * share/txr/stdlib/compiler.tl (usr:compile-file): If a top-level form is compiled that is an atom, don't emit the translation, since it has no effect (beyond interning the symbol).
* compile-file: don't ignore atomic forms.Kaz Kylheku2019-07-071-22/+22
| | | | | | | | | * share/txr/stdlib/compiler.tl (usr:compile-file): do not silently ignore forms that (after macroexpansion) are atoms; treat them like any other forms. This is mostly useless, but if unbound variables are used as top-level forms, it is diagnosed, and keeps the file compilation behavior closer to interpreted semantics.
* Version 219.txr-219Kaz Kylheku2019-07-011-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* stdlib: pass env to constantpKaz Kylheku2019-06-292-8/+8
| | | | | | | * share/txr/stdlib/except.tl (catch**): Obtain macro environment and pass to constantp. * share/txr/stdlib/place.tl (last, butlast): Likewise.
* keyparams: bugfix: key list order scrambled.Kaz Kylheku2019-06-291-17/+11
| | | | | | | | | | | | When the keyword parameter list contains a mixture of constant and non-constant default value expressions, the order of the extracted keys is scrambled, so values go to the wrong variables. * share/txr/stdlib/keyparams.tl (sys:build-key-list): Renamed to build-key-list-expr and rewritten to preserve the key order. (:key): Follow rename of build-key-list.