summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Condensed make output.Kaz Kylheku2014-12-091-0/+18
| | | | | | | | | | | | | | | | * Makefile (VERBOSE): New variable. (V, ABBREV, ABBREV1, ABBREV3): New macro variables. (dbg/%.o, opt/%.o): Use V, ABBREV1 for concensed output. ($(PROG), $(PROG)-dbg, lex.yy.c, y.tab.c, %.out, %.ok, INSTALL): Likewise, but use ABBREV. (tests, GREP_CHECK, config.make, conftest.yacc, conftest.clean): Use $(V) instead of @. (tests.clean): Remove @; do not hide remove commands. (INSTALL): Use $(V) instead of @ and use ABBREV3 to provide condensed output. (install): Use $(V) on $(PREINSTALL) so we don't see : in the output. (install-tests): Put $(V) on all steps.
* Debug builds optional with --debug-also config option.Kaz Kylheku2014-12-071-0/+11
| | | | | | | | | * Makefile (PROG): Variable removed, now set in config.make. (all): Target now depends on $(BUILD_TARGETS) variable, set in config.make. * configure (debug_also) New variable. (gen_config_make): Generate PROG and BUILD_TARGETS variables.
* * arith.c (tofloat, toint): Handle characters.Kaz Kylheku2014-12-051-0/+7
| | | | | | Fix error message in toint wrongly identifying itself as tofloat. * txr.1: Document handling of characters.
* * eval.c (eval_init): Register in function as intrinsic.Kaz Kylheku2014-12-051-0/+12
| | | | | | | | | | * lib.c (in): New function. * lib.h (in): Declared. * txr.1: Documented in. * txr.vim, tl.vim: Regenerated.
* * lib.c (set_diff): Bugfix: use member rather than find,Kaz Kylheku2014-12-051-0/+5
| | | | so that a nil set element is handled properly.
* * Makefile (INSTALL): Bugfix: touch -r $(2) does not workKaz Kylheku2014-12-051-0/+7
| | | | | | right when $(2) is a wildcard like path/to/*.txr. It touches files in the source tree to the timestamp of the argument after -r. Putting in a shell loop to handle this.
* * Makefile (TESTS_TMP): New variable.Kaz Kylheku2014-12-051-0/+11
| | | | | | | | | | (TESTS_OUT): Depends on $(PROG). (TESTS_OK): Does not dependon $(PROG). (tests): Does not depend on tests.clean. (retest): Target removed. (%.out : %.txr): Generate to temporary file, then move to .out. (tests.clean): Remove $(TESTS_TMP).
* * Makefile (SRCS): Compute from top_srcdir, so we don't get a warningKaz Kylheku2014-12-051-0/+5
| | | | from git, and "make enforce" works from out of three builds.
* * configure: Bugfix: the "share" directory has to beKaz Kylheku2014-12-051-0/+6
| | | | | symbolically linked. Without this, tests which require txr to have access to its library do not work.
* TXR now builds optimized and debug at the same time.Kaz Kylheku2014-12-041-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Optimized object files are under opt/ and debug object files are under dbg/. The debug txr executable is called txr-dbg. * Makefile (CFLAGS): $(OPT_FLAGS) is omitted from CFLAGS, so we can expand it where appropriate. (ADD_CONF, EACH_CONF): New variables, used as macros. (DBG_OBJS, OPT_OBJS): New variables. (dbg/%.o, opt/%.o): New rules. (all): New target. ($(PROG)-dbg): New target. (clean): Remove the object directories with rm -rf. Remove $(PROG)-dbg. (depend): Pass $(OPT_OBJS) and $(DBG_OBJS) to depend.txr Also: various target-specific assignments for object files had to be split for rel and dbg. * depend.txr: Updated to handle dbg/ or rel/ prefix on object file paths. * dep.mk: Regenerated.
* * Makefile (clean): add tests.clean as prerequisite.Kaz Kylheku2014-12-041-0/+6
| | | | | (tests): Add tests.clean as prerequiste, remove rm command. (retest, tests.clean): New rules.
* * Makefile (tests/009/json.out): Use eager assignmentKaz Kylheku2014-12-041-0/+5
| | | | intead of lazy assignment to set TXR_ARGS.
* * Makefile (TXR): New variable. We use this to run txrKaz Kylheku2014-12-041-0/+24
| | | | | | | | | | | | | | | | | | | | | | | rather than ./$(PROG). This way we can override the variable from the command line if necessary. (TESTS): Variable removed. (TESTS_OUT, TESTS_OK): New variables, replace TESTS. (tests): Prerequisites is now $(TESTS_OK), which are actual timestamp files. Also depends on $(PROG). (tests/%/%): Target specific assignments are now for .out targets rather than .ok targets. (%.out): New pattern target, made from half of previous %.ok rule. (%.ok): Smaller rule, only performs diff between .out and .expected, and touches the .ok stamp. (%.expected): Bugfix: this rule now just copies .out to .expected, and its prerequisite is %.out rather than %.txr. Previously it tried to run txr, but it wouldn't use the correct options, which depended on the target-specific assignments for various .ok files. (install-tests): Bugfix: in the "make -s -n" call use the new TXR variable to specify the program's path. This fixes the issue that ./ was prepended to the txr commands, resulting in nonworking run.sh. (txr-manpage.html): Use TXR to invoke txr rather than PROG.
* * Makefile: Adding empty .SUFFIXES: to disable built-in suffixes.Kaz Kylheku2014-12-041-0/+6
| | | | | Also set MAKEFLAGS to disable all built-in rules. The only one rule we used is .c to .o, so we provide it ourselves.
* * eval.c (eval_init): Register lequal and gequal.Kaz Kylheku2014-11-271-0/+12
| | | | | | | | | | * lib.c (lequal, gequal, lequalv, gequalv): New functions. * lib.h (lequal, gequal, lequalv, gequalv): Declared. * txr.1: Documented lequal and gequal. * txr.vim, tl.vim: Regenerated.
* * eval.c (eval_init): Register less and greater toKaz Kylheku2014-11-271-0/+11
| | | | | | | | | | the lessv and greaterv functions instead of less and greater. * lib.c (lessv, greaterv): New functions. * lib.h (lessv, greaterv): Declared. * txr.1: Document variadic nature of less and greater.
* * eval.c (eval_init): Register sort-group.Kaz Kylheku2014-11-211-0/+10
| | | | | | | | * lib.c (sort_group): New function. * lib.h (sort_group): Declared. * txr.1: Documented.
* * lib.c (partition_star_func): Bugfix: doing rplaca(env, seq)Kaz Kylheku2014-11-211-0/+7
| | | | | | too early, before the loop which adjusts its value. Restructuring this slightly to avoid duplicated code, by moving the !first check later.
* * lib.c (partition_by_func): Rename one local variable for clarity.Kaz Kylheku2014-11-211-0/+6
| | | | | Remove unessential variable last, and move the next variable into loop scope.
* * arith.c (wrap_star, wrap): New functions.Kaz Kylheku2014-11-201-0/+10
| | | | | | | | * eval.c (eval_init): Registered wrap and wrap* intrinsics. * lib.h (wrap_star, wrap): Declared. * txr.1: wrap and wrap* documented.
* * arith.c (succ, ssucc, sssucc, pred, ppred, pppred): New functions.Kaz Kylheku2014-11-201-0/+10
| | | | | | | | * eval.c (eval_init): Register new functions as intrinsics. * lib.h (succ, ssucc, sssucc, pred, ppred, pppred): Declared. * txr.1: Documented.
* * lib.c (where): Argument order reversed, with compat support.Kaz Kylheku2014-11-201-0/+8
| | | | | | * lib.h (where): Declaration updated. * txr.1: Documented.
* * lib.c (sel): Accept a function in place of the index list.Kaz Kylheku2014-11-201-0/+6
| | | | * txr.1: Documented.
* * lib.c (split_str): If the separator string is empty,Kaz Kylheku2014-11-171-0/+11
| | | | | | | | | | then unless opt_compat is 100 or less, provide a more consistent behavior, rather than splitting the string into characters. This latter behavior was never documented. * txr.1: Documented. * dep.mk: Updated.
* * lib.c (max2, min2): Use the less comparison functionKaz Kylheku2014-11-151-0/+10
| | | | | | | | | for generic semantics. * lib.h (max2, min2): Parameter names changed to avoid suggesting that the operands are numbers. * txr.1: Documentation for min and max updated.
* * eval.c (opip_s, oand_s, chain_s, chand_s): New global variables.Kaz Kylheku2014-11-101-0/+13
| | | | | | | | | | | | (macro_form_p): Forward declaration added. (me_opip): New static function. (eval_init): Intern new symbols, register opip and oand macros to me_opip function. Use chain_s and chand_s in registration for chain and chand. * txr.1: Document opip and oand * tl.vim, txr.vim: Regenerated.
* * lib.c (sub, ref, refset, replace, update, search_list):Kaz Kylheku2014-11-061-0/+7
| | | | | | Fix cut and paste problem: type_mismatch argument expression referring to the C function cons rather than the intended object seq.
* * eval.c (eval_init): Register chand intrinsic.Kaz Kylheku2014-11-061-0/+11
| | | | | | | | | * lib.c (do_chand): New static function. (chandv): New function. * lib.h (chandv): Declared. * txr.1: Documented chand.
* Allow then-func to be omitted in iff. Cleanup.Kaz Kylheku2014-11-061-0/+11
| | | | | | | | | * eval.c (eval_init): Register iff as requiring only one arg. * lib.c (do_iff): Do not check thenfun for nil. Just call it. (iff): Default thenfun to identity. * txr.1: Documentation updated.
* * lib.c (iff): Bugfix: forgotten handling of defaultKaz Kylheku2014-11-051-0/+9
| | | | | | | | argument, resulting in : symbol being called as a function. * txr.1: Removing description of situation when the then-function argument of iff or iffi is specified as nil. This is deprecated behavior which can be obtained by using the false function.
* New macros tb and tc.Kaz Kylheku2014-10-311-0/+9
| | | | | | | * eval.c (me_tb, me_tc): New static functions. (eval_init): Registered tb and tc macros. * txr.1: Documented tb and tc.
* * lib.c (chk_grow_vec): New function.Kaz Kylheku2014-10-301-0/+10
| | | | | | | | | (string_extend): Use chk_grow_vec. (vec_set_length): Avoid subtractions for comparing numbers. * lib.h (chk_grow_vec): Declared. * stream.c (snarf_line, string_out_put_string): Use chk_grow_vec.
* Implementing finalization hooks.Kaz Kylheku2014-10-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | * gc.c (struct fin_reg): New struct type. (final_list, final_tail, mark_makefresh): New static variables. (mark_obj): Under generational GC, if make_makefresh is in effect, set the generation to -1 on all marked objects. (sweep_one): In an EXTRA_DEBUGGING build, call breakpt if the object being swept is the one in break_obj. Under generational GC, place reachable objects that are in generation -1 the freshobj nursery and assign them to generation 0, rather than sticking them into the mature generation 1. (sweep): Under generational gc, reset the freshobj_idx variable here, so that sweep_one has an empty nursery in which to place the generation -1 objects. (prepare_finals, call_finals): New static functions. (gc): Call prepare_finals before sweep, and call call_finals just before re-enabling GC and returning. Do not reset freshobj_idx to zero; this was done in sweep, which may have added entries into it. (gc_finalize): New function. (gc_late_init): Register gc_finalize as intrinsic function finalize. * txr.1: Documented finalize. * HACKING: Documented finalization, described the additional meaning of the -1 generation, and added a section on debugging with break_obj and breakpt.
* * gc.h (break_obj): Missing extern added on declaration.Kaz Kylheku2014-10-301-0/+5
| | | | This broke C++ compilation with -DEXTRA_DEBUGGING turned on.
* Vim syntax coloring for standalone TXR Lisp (*.tl) files.Kaz Kylheku2014-10-291-0/+11
| | | | | | | | | * genvim.txr (generate): New pattern function, contains generation logic so we can do it twice. * txr.vim: Regenerated. * tl.vim: New file.
* * lib.c (type_check): Function moved to header file inline.Kaz Kylheku2014-10-261-0/+8
| | | | | | | (throw_mismatch): New function. * lib.h (throw_mismatch): Declared. (type_mismatch): Declaration turned into inline function.
* * hash.c (hash_begin): Use coerce macro instead of raw C cast.Kaz Kylheku2014-10-251-0/+7
| | | | | | Use cobj_handle so hash argument is validated. * parser.l (YY_INPUT): Use convert macro instead of raw C cast.
* GNU Flex's libfl library provides nothing. Let us not refer to it. ItKaz Kylheku2014-10-241-0/+13
| | | | | | | | | | | | only causes build issues on some systems where it is not provided in the standard location, or is not cross-compiled properly. * Makefile (LEXLIB): Reference to variable removed. * configure (lexlib): Variable removed. (LEXLIB): config.make variable not generated. * parser.l (yywrap): Provide this trivial function as inline.
* * Makefile: Removing trailing spaces.Kaz Kylheku2014-10-241-0/+11
| | | | | | | | | | (GREP_CHECK): New macro. (enforce): Rewritten using GREP_CHECK, with new checks. * arith.c, combi.c, debug.c, eval.c, filter.c, gc.c, hash.c, lib.c, * lib.h, match.c, parser.l, parser.y, rand.c, regex.c, signal.c, * signal.h, stream.c, syslog.c, txr.c, unwind.c, utf8.c: Remove trailing spaces.
* * eval.c (eval_init): Fix incorrect, registration ofKaz Kylheku2014-10-221-0/+5
| | | | repeat; it must have one optional argument.
* Version 100.txr-100Kaz Kylheku2014-10-221-0/+10
|
* Ensure that a hash reorganization doesn't take placeKaz Kylheku2014-10-221-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during a traversal, which could cause items to be visited twice or skipped. * gc.c (full_gc): Changed from static to exter (full_gc): Changed to internal linkage. * gc.h (full_gc): Declared. * hash.c (struct hash): New member, usecount. (struct hash_iter): New member, next. (reachable_iters): New static variable. (hash_mark): Reset the usecount of every reachable hash table. (hash_iter_mark): Add every reachable iterator to reachable_iters list. (make_hash, make_similar_hash, copy_hash): Initialize usecount. (gethash_c): Do not call hash_grow if usecount is nonzero. (hash_begin): Initialize next field of hash_iter to null. Increment use count on hash table. (hash_next): When traversal ends, release use count, and null out the hash table reference. (do_weak_tables): New static function. (do_iters): New static function. (hash_process_weak): Weak hash processing logic moved to do_weak_tables. Also calls do_iters. * txr.1: Describe hash table traversal, and the assurances and caveats about inserting and deleting items.
* * eval.c (interp_fun): If the function doesn't haveKaz Kylheku2014-10-211-0/+6
| | | | | specials, then don't bother saving and restoring dynamic env around the argument binding and evaluation.
* * eval.c (eval_init): Register notf intrinsic function.Kaz Kylheku2014-10-211-0/+16
| | | | | | | | | | | | | | * lib.c (do_not): New static function. (notf): New function. * lib.h (notf): Declared. * txr.1: Documented notf. * share/txr/stdlib/txr-case.txr (bindable): Eliminated. (txr-if): Use functional expression, taking advantage of notf. * txr.vim: Regenerated.
* * share/txr/stdlib/txr-case.txr: New file.Kaz Kylheku2014-10-211-0/+14
| | | | | | | | | | | | * txr.1: Document txr-if, txr-when and txr-case. * genvim.txr: Added new macro names. * tests/011/txr-case.expected: New file. * tests/011/txr-case.txr: New file. * txr.vim: Regenerated.
* Source file inclusion implemented: needed for macros.Kaz Kylheku2014-10-201-0/+23
| | | | | | | | | | | | | | | | | | | | | * match.c (include_s): New symbol variable. (v_load): Function extended to handle include semantics. (include): External wrapper function for doing inclusion via v_load. (syms_init): include_s initialized. * match.h (include_s): Declared. (include): Declared. * parser.y (check_for_include): New static function. (clauses_rev): Use check_for_include to replace @(include ..) directive. * txr.1: Documented include. * genvim.txr: Added include symbol. * txr.vim: Regenerated.
* * match.c (match_fun): Bugfix: replace incorrect plain returnKaz Kylheku2014-10-191-0/+10
| | | | | | | | | with debug_return. This causes a stray debug frame to be left on the environment stack which turns to garbage, leading to an invalid longjmp in another debug_return elsewhere which tries to use that frame. This was diagnosed by valgrind indicating accesses below the stack frame, and also by glibc "longjmp causes uninitialized stack frame" abort.
* * parser.l (lisp_parse): Bugfix: the error_stream argumentKaz Kylheku2014-10-191-0/+10
| | | | | | | | | must be checked to be a stream before we plant it in place of std_error, otherwise we will get a type exception thrown lower down, which leads to runaway recursion as TXR tries to print the error messages on std_error. * dep.mk: Regenerated.
* * parser.y (r_exprs): New grammar symbol. r_exprs usesKaz Kylheku2014-10-191-0/+10
| | | | | | | | | left-recursive rules to avoid filling the yacc stack, and returns the items in reverse order. The output of each r_exprs-generating rule consists of a list which gives the terminating atom, and then the list contents in reverse order. (n_exprs): Becomes wrapper for r_exprs which deals with the terminating atom, and reversed items.
* * parser.y: Allow TXR to support large programs, and efficiently so.Kaz Kylheku2014-10-181-0/+12
| | | | | | | | | | | (clauses_rev): New grammar symbol. Uses a left-recursive rule that does not consume an amount of parser stack proportional to the number of clauses, and sticks to efficient consing, which means that the list is built up in reverse. (clauses): Now just a wrapper rule for clauses_rev which nreverses its output. (clauses_opt): Retargetted to use clauses_rev instead of clauses, and reverse its output.