summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Move initialization calls to more suitable place.Kaz Kylheku2015-05-011-0/+10
| | | | | | | | * lib.c (init): Initialize parser, syslog and glob modules here. * txr.c (main): Remove initialization of parser, syslog and glob modules from here.
* * signal.h (sig_save_disable): Bugfix: macro enablingKaz Kylheku2015-05-011-0/+5
| | | | rather than disabling async signals.
* Fix corruption triggered by extended gc disabling.Kaz Kylheku2015-05-011-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that when gc is disabled, the gc function does nothing. But various code depends on calls to gc() doing something, like making space available in various static arrays. When gc is disabled for long periods, there are issues, like array overruns. * gc.c (gc): Must no longer be called at all if gc_enabled is false, and asserts that it is true. Callers must check the gc_enabled flag and implement appropriate cases. (make_obj): Only call gc when gc_enabled is true. If there is no space in the freshobj array after trying gc, or gc couldn't be tried because it is disabled, then schedule a full gc. (gc_set): If the checkobj array is full, only call gc if gc is enabled, otherwise schedule a full_gc. (gc_mutated): Do not assume that the mutobj array has room for another object; only set the object's generation to -1 and put it into the array if there is room. Similarly to gc_set, do a gc if there is no room, but if gc is not enabled, then schedule a full gc. (gc_wrap): Only call gc if gc_enabled is true, and return t in that case rathe than nil. * txr.1: Document return value of sys:gc function.
* Fix source location for dangling unquotes and splices.Kaz Kylheku2015-04-301-0/+12
| | | | | | | | | | * parser.y (grammar): Propagate the parser line number to the unquote or splice form, if it has not received location info from its operand (because its operand is an atom). In the quasi_item case, we also use rlcp_tree to make sure the info is propagated through the list being consed up. (rlcp_tree): Bugfix: propagate the source location info to every cons in the list itself, not just into their cars.
* Improved syntax checking: defun, flet, labels, lambda.Kaz Kylheku2015-04-291-0/+16
| | | | | | | | | | | | | | * eval.c (check_lambda_list): New static function. (op_defun): Argument list checking moved into check_lambda_list, which is called for defun out of do_expand. Name checks moved into do_expand. Thus, defun is checked earlier, at expansion time. (me_flet_labels): Check the lambda list of each lexical function with check_lambda_list. (do_expand): Check the syntax of the lambda form, and the validity of its argument list. Check the name of a defun or defmacro for validity. Check the validity of the defun argument list.
* Bugfix: cannot print (lambda . 42) structure.Kaz Kylheku2015-04-291-0/+7
| | | | | * lib.c (obj_print, obj_pprint): Fix mistake in the test for properly formed lambda syntax whcih is printed specially.
* Adding poll function.Kaz Kylheku2015-04-281-0/+16
| | | | | | | | | | | | | | * configure: Check for the poll function and set HAVE_POLL accordingly in config.h. * stream.h (fd_k): External declaration added. * sysif.c (poll_wrap): New function. (sysif_init): Registered poll-in, poll-out, poll-err, poll-pri, poll-rdhup, poll-nval, poll-rdband, poll-wrband variables and poll function. * txr.1: Documented poll.
* Version 107.txr-107Kaz Kylheku2015-04-261-0/+12
|
* Allow (force ...) to be an assignable place.Kaz Kylheku2015-04-251-0/+16
| | | | | | | | | | | | | | This allows mlet variables to be assignable. * eval.c (force_s): New global variable. (op_modplace): Handle force form. (me_mlet): Use force_s symbol. (force_l): New static function. (eval_init): Initialize force_s variable. Use it in registration of force function. * txr.1: Remove text in mlet definition that variables are not assignable. Replace with note about an unspecified behavior.
* Introducing mlet macro.Kaz Kylheku2015-04-251-0/+9
| | | | | | | * eval.c (me_mlet): New static function. (eval_init): Registered mlet macro. * txr.1: Documented mlet.
* * lib.c (symbol_package): If the argument is nil, returnKaz Kylheku2015-04-251-0/+6
| | | | | the user package directly, not the value of the *user-package* variable.
* Remove silly package lookup from keywordp.Kaz Kylheku2015-04-251-0/+12
| | | | | | | | | | This tiny change yields a 165% (2.65X) speedup in the tst/tests/011/mandel.txr test case. * lib.c (keywordp): Use keyword_package_var instead of the keyword_package macro which looks up the global environment. * parser.y (sym_helper): Likewise.
* Regression: runaway allocation of heaps.Kaz Kylheku2015-04-241-0/+12
| | | | | | | | | | * gc.c (make_obj): Fix regression introduced on 2014-10-18, released in TXR 100. Because make_obj discontinues placing objects into the freshobj_array when the full_gc flag has been set, it is incorrect to allocate another heap when the free list is exhausted and the freshobj_array has room remaining. It has room remaining because it is disused.
* * gc.c (make_obj, gc): The check for insufficient space in freshobjKaz Kylheku2015-04-241-0/+5
| | | | array after a gc is moved into the gc function.
* * gc.c (gc): Minor off-by-one: compare gc_counter to FULL_GC_INTERVALKaz Kylheku2015-04-241-0/+5
| | | | rather than FULL_GC_INTERVAL - 1, since it is pre-incremented.
* Switch to in-tree mpi directory.Kaz Kylheku2015-04-221-0/+18
| | | | | | | | | | | | | | | | * Makefile (CFLAGS, MPI_OBJS): Refer to mpi directory without version number. (repatch): Target removed. (distclean): Don't try to remove old unpacked tarball mpi directory. * configure (mpi_version, have_quilt, have_patch): Variables removed. (gen_config_make): Do not generate mpi_version make variable. Do not test for quilt or patch. No longer extract MPI tarball or try to apply patches. * mpi-1.8.6.tar.gz: File removed. * mpi-patches: Directory and all files under it removed.
* delay/force overhaul.Kaz Kylheku2015-04-221-0/+15
| | | | | | | | | | | | | * eval.c (promise_forced_s, promise_inprogress_s): New symbol variables. (me_delay): Change representation of promises so that the original delay form is stashed there for better reporting in the force function. Also, propagate the debug info from the second argument of the form to the entire form; otherwise it will inherit it from elsewhere. (force): Rewritten to follow new three-state representation to detect the recursive case and diagnose it. (eval_init): Register new symbol variables.
* ChangeLog fixup: "Version 106" missing.Kaz Kylheku2015-04-211-0/+2
|
* Version 106.txr-106Kaz Kylheku2015-04-211-0/+8
|
* Bugfix: throwing error when trying to print valid regexps.Kaz Kylheku2015-04-191-0/+8
| | | | | | * regex.c (print_rec): Only dianose "bad object in regex syntax" for some atom other than nil, which denotes an empty (sub)expression, like what results from #// or #/a|/ and such.
* Do not allow unrecognized escapes in regex.Kaz Kylheku2015-04-191-0/+14
| | | | | | | | | | | | * parser.l (REGOP): New regex alias for matching all regex special characters. (grammar): Several rules for regex special characters merged together. New rule introduced to match a special character after a backslash, making it literal. The old rule which makes literal any character after a backslash now throws an error, unless version 105 comaptibility is selected. * txr.1: Documented this behavior change.
* Improvement in error reporting.Kaz Kylheku2015-04-191-0/+14
| | | | | | | | | | | | This fix prevents certain situations when an inappropriate form is reported, in the default unhandled exception handler, as pertaining to an error. * eval.c (do_eval): Save and restore the last_form_evaled, in an exception-unsafe way. If we successfully evaluate a form or subform, we can restore the previous one. (expand): Save and restore last_form_expanded similarly. We don't need the unwind block and counter.
* Adding lcons macro.Kaz Kylheku2015-04-181-0/+11
| | | | | | | | | * eval.c (me_lcons): New function. (eval_init): Registered lcons macro. * txr.1: Documented lcons. * tl.vim, txr.vim: Regenerated.
* Adding getenv, setenv and unsetenv.Kaz Kylheku2015-04-181-0/+16
| | | | | | | | | | | | | | * lib.c (setenv, unsetenv): Changed static functions to external. Moved them out of the #if !HAVE_TIMEGM block. * lib.h (setenv, unsetenv): Declared. * sysif.c (getenv_wrap, setenv_wrap, unsetenv_wrap): New functions. (sysif_init): Registered getenv, setenv and unsetenv. * txr.1: Documented getenv, setenv and unsetenv. * tl.vim, txr.vim: Regenerated.
* Fix quasistring regression introduced in TXR 81.Kaz Kylheku2015-04-181-0/+10
| | | | | | | | * parser.y (expand_meta): This function must recognize quasistrings, inside (sys:quasi ...) forms, (sys:var ...) forms do not denote TXR Lisp variables. These must not be expanded. Doing so is not only wrong, but the way it was done broke brace variables by stripping their arguments.
* Adding exit* function which calls _exit.Kaz Kylheku2015-04-161-0/+11
| | | | | | | | | * sysif.c (exit_star_wrap): New static function. (sysif_init): Registered exit* intrinsic. * txr.1: Documented exit*. * tl.vim, txr.vim: Regenerated.
* Add exec and pipe functions.Kaz Kylheku2015-04-161-0/+13
| | | | | | | | | | | * configure: Check for pipe. * sysif.c (exec_wrap, pipe_wrap): New static functions. (sysif_init): Register exec and pipe intrinsics. * txr.1: Documented exec and pipe. * tl.vim, txr.vim: Regenerated.
* Adding chmod.Kaz Kylheku2015-04-161-0/+13
| | | | | | | | | | | * configure: Detect chmod. * sysif.c (chmod_wrap): New function. (sysif_init): Register chmod intrinsic. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
* Adding dotimes macro.Kaz Kylheku2015-04-161-0/+9
| | | | | | | * eval.c (me_dotimes): New function. (eval_init): Registering dotimes macro. * txr.1: Documented dotimes.
* Fix escaping issues in open-process on Windows.Kaz Kylheku2015-04-151-0/+17
| | | | | | | | | | | | | | | This can now execute programs with spaces in their path names. Arguments can contain embedded double quotes, and other characters that are special to cmd.exe, like &, |, (, ), ^ and others. * stream.c (string_extend_count, win_escape_cmd): New static functions. (win_escape_arg): Fix and extend escaping scheme to cover not only the argument processing scheme implemented by programs which use Microsoft's C library, but also to smuggle the command line through cmd.exe. (win_make_cmdline): Use win_escape_cmd to wrap the command. Escape the quotes which are placed around arguments, so cmd.exe doesn't interpret them, which will cause it to suppress its processing of the caret escapes.
* Allow quasiquotes in braces and quasiliterals, and quotes in braces.Kaz Kylheku2015-04-151-0/+11
| | | | | | | | | * parser.l: Consolidate rules for recognizing quote, unquote, and quasiquote. An effect of this is that quasiquotes can now occur in braces and in string quasiliterals. * parser.y (quasi_item): Support quotes and quasiquotes as quasi items: that is to say, i.e. objects denoted by @ in a quasiliteral.
* Diagnose trailing junk in numeric literals.Kaz Kylheku2015-04-141-0/+9
| | | | | | | * parser.l: Combining the handling of hex, octal and binary numeric literals into a single rule. Implementing an additional rule which diagnoses such tokens that have trailing junk. Thus, something like #x1F2AZ is now invalid syntax.
* Implementing while* and until* loops.Kaz Kylheku2015-04-111-0/+13
| | | | | | | | | | | * eval.c (while_star_s, until_star_s): New symbol variables. (me_while_star, me_until_star): New static functions. (eval_init): Initialize new variables. Register while* and until* macros. * txr.1: Documented while* and until*. * txr.vim, tl.vim: Regenerated.
* * sysif.c: Use HAVE_FORK_STUFF to wrap fork, waitpid and dup/dup2.Kaz Kylheku2015-04-111-0/+4
|
* Exposing dup and dup2.Kaz Kylheku2015-04-111-0/+12
| | | | | | | | | | * sysif.c (dup_wrap): New static function. (sysif_init): Register dup_wrap as dupfd. The name dup conflicts with an existing function. * txr.1: Documented dupfd. * txr.vim, tl.vim: Regenerated.
* Functions open-fileno and fileno.Kaz Kylheku2015-04-101-0/+18
| | | | | | | | | | | | | | | | * stream.c (fd_k): New keyword variable. (stdio_get_prop): Handle the :fd property by returning the file descriptor. (open_fileno): New function. (stream_init): Initialize fd_k, and register fileno and open-fileno. * stream.h (open_fileno): Declared. * txr.1: Documented open-fileno and fileno. * utf8.c (w_fdopen): New function. * utf8.h (w_fdopen): Declared.
* * gc.c (sweep): Fix comment referring to nonexistent identifier.Kaz Kylheku2015-04-101-0/+4
|
* * eval.c (eval_init): There is an until_s global variable, soKaz Kylheku2015-04-101-0/+5
| | | | no need to intern the symbol when registering me_until.
* Fork and wait support.Kaz Kylheku2015-04-091-0/+16
| | | | | | | | | | | | | | * sysif.c (work_wrap, wait_wrap, wifexited, wexitstatus, wifsignaled, wtermsig, wcoredump, wifstopped, wstopsig, wifcontinued): New static functions. (sysif_init): Register new intrinsics: functions fork, wait, w-ifexited, w-exitstatus, w-ifsignaled, w-termsig, w-coredump, w-ifstopped, w-stopsig, w-ifcontinued; and variables w-nohang, w-untraced, w-continued. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
* * eval.c (iflet_s, when_s): New global variables.Kaz Kylheku2015-04-061-0/+12
| | | | | | | | | | | (me_iflet_whenlet): New static function. (eval_init): Initialize when_s, iflet_s. Use when_s for registering me_when. Register me_iflet_whenlet. * txr.1: Documented iflet and whenlet. * tl.vim, txr.vim: Regenerated.
* New whilet macro.Kaz Kylheku2015-04-051-0/+13
| | | | | | | | | | | * eval.c (while_s): New symbol variable. (me_whilet): New static function. (eval_init): Initialize while_s. Use while_s in registration of while macro. Register new whilet macro. * txr.1: whilet is documented. * tl.vim, txr.vim: Regenerated.
* New zap operator.Kaz Kylheku2015-04-011-0/+10
| | | | | | | | * eval.c (zap_s): New global variable. (op_modplace): Support zap. (eval_init): Initialize zap_s, and register as operator. * txr.1: Documented zap.
* Array overrun fix in apply.Kaz Kylheku2015-03-311-0/+11
| | | | | | | | | * eval.c (APPLY_ARGS): New preprocessor symbol, replaces hard-coded 32 inside apply. (apply): Use APPLY_ARGS for argument array. Fix overrun of args array in non-variadic function case when list has more than APPLY_ARGS elements. Eliminate superflous "variadic" local variable.
* Deal with spurious retention in function application.Kaz Kylheku2015-03-311-0/+14
| | | | | | | | | | | | * gc.h (zap): New inline function. (z): New macro. * lib.c (generic_funcall, funcall1, funcall2, funcall4, do_not, do_dup, do_iff): Use z macro to burn funargs with no next use. * eval.c (apply, apply_frob_args, iapply, call, do_eval, op_dwim, mapcarv, mappendv, lazy_mapcarv_func, mapdov, do_apf, do_ipf, callf): Use z macro to burn funargs with no next use.
* * stream.c (vformat): Bugfix: ~X printing in lower case, like ~x,Kaz Kylheku2015-03-301-0/+5
| | | | when argument is a bignum integer.
* * mpi-patches/eliminate-locale-dependencies: New patch.Kaz Kylheku2015-03-291-0/+7
| | | | | | (s_mp_tovalue): Eliminate use of isupper, islower. * mpi-patches/series: Add patch.
* New -n option. New "i" mode letter in file opening functions.Kaz Kylheku2015-03-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | * stream.c (struct stdio_mode): New struct type. (stdio_mode_init_trivial): New initializer macro. (parse_mode, format_mode, normalize_mode, set_mode_props): New static functions. (make_stdio_stream_common): the isatty check, and automatic marking of tty device streams as real-time is no longer done, unless backward compatibility 105 or earlier is requested. (open_file, open_tail, open_command, open_process): Use new mode parsing, which supports the "i" flag. (stream_init): If we have isatty, and standard input is a tty, then mark the *std-input* stream as real-time. * txr.1: Document -n/--noninteractive option. Fix typo where real-time-stream-p is referred to as stream-real-time-p. Document "i" flag on open-file and others. * txr.c (opt_noninteractive): New global. (help): Help text for -n/--noninteractive. (txr_main): Handle new options. * txr.h (opt_noninteractive): Declared.
* * eval.c (prinl, pprinl): Become external functions.Kaz Kylheku2015-03-281-0/+12
| | | | | | | | | | | (tprint): New function. (eval_init): Register tprint as intrinsic. * eval.h (prinl, pprinl, tprint): Declared. * txr.c (txr_main): New option, -t. * txr.1: Documented tprint and -t option.
* * eval.c (eval_init): register get-lines as having one optionalKaz Kylheku2015-03-281-0/+9
| | | | | | | | argument. * lib.c (lazy_stream_cons): Default the argument to std_input. * txr.1: Document that the stream is optional in get-lines.
* * Makefile (enforce): Update error error message.Kaz Kylheku2015-03-241-0/+8
| | | | | | * configure (have_git): Don't set this variable if the TXR repository is missing, even if git is installed. I.e. have_git means have have the tool and the repo.