summaryrefslogtreecommitdiffstats
path: root/combi.c
Commit message (Collapse)AuthorAgeFilesLines
* More generational GC fixes. One GC fix.Kaz Kylheku2014-03-271-8/+8
| | | | | | | | | | | | | | | * combi.c (perm_init_common, comb_gen_fun_common, rcomb_gen_fun_common): Use set macro instead of plain assignment. * hash.c (hash_grow, copy_hash, hash_update_1): Use set macro instead of plain assignment. * lib.c (nreverse, lazy_appendv_func, lazy_appendv, vec_push, refset): Use set macro instead of plain assignment. (make_package): Assign all fields of the newly created PKG object before calling a function which can trigger GC. * parser.y (rlset): Use set macro.
* * combi.c (rperm_gen_full): Update ptail with return valueKaz Kylheku2014-02-181-1/+1
| | | | | of list_collect. This is not necessary for correctness, but it spares list_collect from having to search for the tail on each call.
* * combi.c (comb_hash_while_fun, comb_hash_gen_fun, comb_hash): NewKaz Kylheku2014-02-111-0/+35
| | | | | | | | | | | | | static functions. (comb): Support hash tables. * hash.c (print_key_val): When values are nil, print in a more condensed way by omitting the second element. This notation is accepted as input already by the parser. (hash_insert_pair): New function. * txr.1: Description of comb updated to indicate that it works over hashes.
* * Makefile (OBJS): New object file, combi.o.Kaz Kylheku2014-02-111-0/+581
* dep.mk: Updated. * eval.c: Removed combination and permutation functions; they now reside in combi.c. (generate): Changed from static to external linkage. * eval.h (generate): Declared. * combi.c: New file. * combi.h: New file. * txr.vim: Regenerated.