| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* lib.c (init): Initialize parser, syslog and glob modules
here.
* txr.c (main): Remove initialization of parser, syslog and glob
modules from here.
|
|
|
|
| |
rather than disabling async signals.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* lib.c (obj_print, obj_pprint): Fix mistake in the test for
properly formed lambda syntax whcih is printed specially.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* eval.c (me_mlet): New static function.
(eval_init): Registered mlet macro.
* txr.1: Documented mlet.
|
|
|
|
|
| |
the user package directly, not the value of the *user-package*
variable.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
array after a gc is moved into the gc function.
|
|
|
|
| |
rather than FULL_GC_INTERVAL - 1, since it is pre-incremented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_lcons): New function.
(eval_init): Registered lcons macro.
* txr.1: Documented lcons.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* sysif.c (exit_star_wrap): New static function.
(sysif_init): Registered exit* intrinsic.
* txr.1: Documented exit*.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Detect chmod.
* sysif.c (chmod_wrap): New function.
(sysif_init): Register chmod intrinsic.
* txr.1: Documented.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
| |
* eval.c (me_dotimes): New function.
(eval_init): Registering dotimes macro.
* txr.1: Documented dotimes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 (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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
no need to intern the symbol when registering me_until.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* eval.c (zap_s): New global variable.
(op_modplace): Support zap.
(eval_init): Initialize zap_s, and register as operator.
* txr.1: Documented zap.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
when argument is a bignum integer.
|
|
|
|
|
|
| |
(s_mp_tovalue): Eliminate use of isupper, islower.
* mpi-patches/series: Add patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
| |
argument.
* lib.c (lazy_stream_cons): Default the argument to std_input.
* txr.1: Document that the stream is optional in get-lines.
|
|
|
|
|
|
| |
* 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.
|