| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
| |
* configure: MPI is now extracted and patched in the build directory,
not in the source directory.
* Makefile (CFLAGS): Refer to mpi headers relative to current
directory, not $(top_srcdir).
(repatch): Run MPI repatching steps in correct directory.
(clean): Remove extracted MPI from build directory.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
| |
(char_set_addr_str): New function.
(char_set_compile): Use char_set_addr_str to
add spaces to set.
(init_special_char_sets): Use char_set_addr_str to
add spaces to set. Bugfix: word_cs, cword_cs wrongly initialized.
(regex_init): Removed reference to regex_space_chars.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(regterm): REGTOKEN production factored out to regtoken.
(regclass): Reverted prior commmit's changes.
(regclassterm): Reverted prior commit, removing REGTOKEN
production for character classes, and introduced a regtoken
production. So now the keyword symbols are part of the
character class abstract syntax.
(regtoken): New production rule.
* regex.c (regex_space_chars): Converted to internal linkage.
(char_set_compile): Handle token keywords in character class
abstract syntax.
* regex.h (regex_space_chars): External declaration removed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (init): Call regex_init.
* parser.l: return new REGTOKEN kind.
* parser.y (REGTOKEN): New token type.
(REGTERM): Translate REGTERM to keyword.
(regclass): Restructured to handle inherited nodes as lists.
(regclassterm): Produce $$ as list. Add handling for REGTOKEN
occurring inside character class by expanding it. This might not
be the best approach.
(yybadtoken): Handle REGTOKEN in switch.
* regex.c (struct any_char_set, struct small_char_set,
struct displaced_char_set, struct large_char_set,
struct xlarge_char_set): New bitfield member, stat.
(char_set_create): New parameter for indicating static char set.
(char_set_destroy): Do not free a static char set.
(char_set_compile): Pass zero to new parameter of char_set_create.
(spaces): New static array.
(space_cs, digit_cs, word_cs, cspace_cs, cdigit_cs, cword_cs): New
static pointers to char_set_t.
(init_special_char_sets, nfa_compile_given_set): New static function.
(nfa_compile_regex, dv_compile_regex): Handle new character set token
keywords.
(space_k, digit_k, word_char_k, cspace_k, cdigit_k, cword_char_k,
regex_space_chars): New variables.
(regex_init): New function.
* regex.h (space_k, digit_k, word_char_k, cspace_k, cdigit_k,
cword_char_k, regex_space_chars, regex_init): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remqual*, remove-if*, keep-if*.
* lib.c (rem_lazy_func, rem_lazy_rec): New static functions.
(remq_lazy, remql_lazy, remqual_lazy, remove_if_lazy,
keep_if_lazy): New functions.
* lib.h (remq_lazy, remql_lazy, remqual_lazy, remove_if_lazy,
keep_if_lazy): Declared.
* txr.1: New functions documented.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (find): First and second arguments reversed.
The item should be first.
(find_if): New function.
* lib.h (find): Declaration updated.
(find_if): Declaration added.
* txr.1: Stub section.
|
| |
|
|
|
|
|
|
|
|
| |
* lib.c (remove_if, keep_if): New functions.
* lib.h (remove_if, keep_if): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
nonexistent options. Variable default values are established first,
which simplifies the syntax. The scanning loop detects attempts
to create configuration variables that do not exist.
The var_given convention is folded into the parsing. (If var
exists, and var_given exists, and the user specifies var,
then var_given is set to y to indicate that the value came
from the user.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in argument list. Fix is not to rely on the hack of using the first
element of the list of files to hold the name of the current file.
* match.c (match_files_ctx): New member, curfile.
(mf_all): Initialize curfile.
(mf_args): Set curfile to "args".
(mf_file_data): Initialize curfile.
(v_skip, v_fuzz, v_gather, v_collect): Use c->curfile rater than
first(c->files) in debug calls.
(freeform_prepare, match_files): Pass c->curfile to ml_all constructor
of match_line_ctx rather than rather than first(c->files).
|
|
|
|
|
|
|
|
|
|
|
| |
character compounds. I.e. the syntax "foo" is equivalent to the
cumbersome canonical form (compound #\f #\o #\o).
* regex.c (nfa_compile_regex, dv_compile_regex): Use chrp function
instead of typeof. Handle stringp case by forming a compound out of the
characters and recursing. Check for some bad objects in the regex
that would never come out of our regex parser but could occur
in a "hand crafted" syntax tree.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New intrinsic functions source-loc
and source-loc-str. New variable *self-path*.
* txr.1: Stub doc sections.
* txr.c (self_path): New variable.
* txr.h (self_path): Declared.
* txr.vim: Syntax highlighting for source-loc, source-loc-str
and *self-path*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to work around TXR build problems by running make inside
the MPI directory, which is wrong.
Also fixing an incorrect use of ctype.h functions in
MPI and one case of a superfluous warning.
* mpi-patches/series: new patches added.
* mpi-patches/disable-make: New file.
* mpi-patches/fix-ctype-warnings: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (EXTRA_FLAGS): Handy new variable for additional
ad-hoc CFLAGS. Needed by a new test in configure.
* configure: Check for annoying warnings about char being used
as an array subscript when calling the macros from <ctype.h>.
If this occurs, suppress it by #undef-ing the macros.
(lang_flags): Switching fromm _XOPEN_SOURCE to _XOPEN_SOURCE=2
because this is needed on NetBSD to obtain declarations of
popen and pclose.
* stream.c (pipe_close): If we don't have the WIFCONTINUED macro,
then define it to expand to zero. It's absent on NetBSD and they
already seem to have a hack for this because there is a warning about
the function not being defined, but then the program links anyway.
Let's do it properly and not rely on their hack.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(in_int_ptr_range): New function.
(arith_init): Initialize INT_PTR_MAX_MP.
* arith.h (in_int_ptr_range): Declared.
* lib.c (c_num): Allow bignums to be converted to a cnum, if
they are in range, rather than allowing only fixnums.
* rand.c (make_random_state): Now that we have such a function,
initialize random seed using time value from time_sec_usec rather than
from time and clock. clock is bad for random seeding because it
measures virtual time since the start of the process.
|
|
|
|
|
|
|
|
| |
We will be relying on the gettimeofday function which only came
into POSIX in 2001, but was in Unix long before then.
* HACKING: Replace notes about -D_POSIX_C_SOURCE which are not true
any more.
|
|
|
|
|
|
|
| |
* configure: The test for non-working 128 bit integers in the gcc
used by NetBSD 5.1 is not good enough to catch the bug.
Adding a test which will assume that gcc 4.3.x and lesser
does not have working 128 bit types.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (obj_init): Change spelling of nongreedy operator and put
it into the user package so that it is available for use with
regex-compile.
* regex.c (match_regex, search_regex): Bugfix: optional start
position argument argument not defaulting to zero.
* txr.1: Documented regex-compile and regexp.
* txr.vim: Highlighting regex-compile and regexp.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (bignum_dbl_ipt): Added missing #if HAVE_DOUBLE_INTPTR_T
around function
* configure: NetBSD's shell is too pathetic to expand "$@" properly
when there are no positional arguments, so I applied the ${@+"$@"}
trick.
(make): New variable. GNU make might be known only as gmake,
so we now detect the command for our own use within the configure
script and also for giving the user advice on what command to use for
building. Put in a fix so that the attempt to run $make --version
does not bail the script under "set -e" if that command terminates
unsuccessfully.
The check for clashing names has been moved earlier, so that
the renaming #define's appear early in config.h (so config.h itself
can rely on the renames). The identifier longlong_t has been added
to the potential clash list. NetBSD exposes this identifier in spite
of -D_POSIX_SOURCE=2, and it clashes with our longlong_t.
The tests for integers wider than long long has been modified
to actually compile a multiplication of two long-long-s into
the wider precision. On the NetBSD system, with gcc 4.1.3, I found
that the __int128 type is there, but doesn't actually work;
compilation of arith.c bails with an internal compiler error.
We now get this internal error at configure time and avoid using
the type.
|
|
|
|
|
|
|
|
| |
code on platforms where mp_digit is smaller than long.
This was left shifting a mp_digit by MP_DIGIT_BIT.
It was found by compiling on NetBSD with a gcc 4.1.3
which has a broken__int128_t, forcing us to use 32 bit
mp_digit with a 64 bit mp_word.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.h (bignum): Declared.
* configure: Added check for tm_gmtoff and tm_tmzone fields
being present in struct tm.
* eval.c (eval_init): New intrinsic functions: time, time-usec.
* lib.c (num): If the cnum is outside of the fixnum range, then
construct a bignum.
(time_sec, time_sec_usec): New functions.
* lib.h (mut): Slight change to macro to eliminate compiler warning.
(time_sec, time_sec_usec): Declared.
* txr.1: Stub section for time and time-usec.
* txr.vim: Highlighting for time and time-usec.
|
| |
|
| |
|
|
|
|
|
| |
<windows.h> section because that header is conditionally included
based on one of the config constants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (conftest.syms): Use -n flag in nm so that the output
is not alphabetically sorted, but numerically. We need this
to get the symbols ordered by increasing offset.
* configure (read_syms): New function. Factors out logic used
in two places for reading the output of nm. On OSX Lion, it looks
like we do not get symbol sizes but offsets only, when compiling
with g++. The symbols are in an S section. When compiling with
gcc, we get a common C section with symbol sizes.
So the hack is to use the deltas between offsets to get the sizes.
The objects had to be re-ordered in decreasing rank so alignment
doesn't create padding that will get counted as the size.
Interleaved dummy objects of type char should also work.
|
|
|
|
| |
clashing symbols.
|
|
|
|
|
|
| |
which we can redefine out of the way in config.h.
* lib.c: config.h was being included before <windows.h>.
|
|
|
|
| |
match-regex and regsub.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can walk table content in different ways.
* eval.c (op_dohash): Follow interface change of hash_next.
(eval_init): hash-keys, hash-values, hash-pairs and hash-alist
intrinsics introduced.
* filter.c (trie_compress): Follow interface change of hash_next.
* hash.c (hash_next): Silly interface which takes a pointer to
the iterator has changed to just take the iterator. The function
unambiguously returns nil when the iteration ends, so there
is no need to set the iterator variable to nil.
(maphash): Follows interface change of hash_next.
(hash_keys_lazy, hash_values_lazy, hash_pairs_lazy, hash_alist_lazy):
New static functions.
(hash_keys, hash_values, hash_pairs, hash_alist): New functions.
* hash.h (hash_next): Declaration updated.
(hash_keys, hash_values, hash_pairs, hash_alist): Declared.
* lib.c (make_half_lazy_cons): New way of constructing lazy cons,
with the car field specified. It simplifies situations when the
previous cons computes the car of the next one. Why hadn't I thought of
this before?
* lib.h (make_half_lazy_cons): Declared.
* txr.1: Doc stubs for new hash functions.
* txr.vim: Highlighting for new hash functions.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
ChangeLog
|
| |
| |
| |
| | |
(freshobj, make_obj): Object and function definitions follow rename.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
than gen == 0. This allows gen == -1 objects to be considered the
same as gen == 0, and traversed.
(gc_set, gc_mutated): When a gen 0 object is added to the checkobj
array, set its generation to -1. This prevents duplicates in
the checkobj array. Also, it fixes a bug: an vector marked as
mutated was not being traversed due to being in generation 1.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* gc.c (BACKPTR_VEC_SIZE): Preprocessor symbol renamed to
CHECKOBJ_VEC_SIZE.
(FULL_GC_INTERVAL): Increased to 40 since the modified
algorithm now leaves less work for the full gc to do.
(backptr, backptr_idx): Static variables renamed to
checkobj and checkobj_idx.
(mark): Follows rename of backptr and backptr_idx.
(gc): Commented out handy printf added.
(gc_set): Use in_malloc_range check to avoid adding to
the check array pointers which are being stored in non-heap locations,
since non-heap locations are already GC roots.
(gc_mutated): Follows variable renaming.
(gc_push): Just do the push using gc_set.
* lib.c (malloc_low_bound, malloc_high_bound): New variables.
(chk_malloc, chk_calloc, chk_realloc): Updated malloc_low_bound
and malloc_high_bound.
(in_malloc_range): New function.
* lib.h (in_malloc_range): Declared.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
which hold direct references to other objects and must be used
each time a mutation takes place.
* eval.c (op_dohash): invocations of mut macro removed.
Comment rewritten.
* lib.c (sort_list): Use set macro for mutating assignment.
Do not invoke mut on sorted list; it won't work anyway, because
it doesn't mean what the code wants it to mean: that the list will be
fully traversed during gc marking.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* gc.c (gc_mutated): Return the value.
* gc.h (gc_mutated): Declaration updated.
* hash.c (remhash): Fix unsafe assignment to use set macro.
* lib.c (sort): Fix wrong use of mut macro on the list
before it is sorted rather than after.
* lib.h (mut): Trivial version of macro updated to return argument.
* unwind.c (uw_init): The toplevel environment's match_context
should be gc_protected. Though this is probably not used,
which is why it has not been a problem.
|
| |
| |
| |
| | |
useless use of *vecref_l() with vecref().
|
| |
| |
| |
| |
| |
| | |
Help section added for gen_gc variable.
* gc.c (gc): Some missing CONFIG_GEN_GC added.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* gc.c (backptr_oflow): Static variable removed.
(freshq_head, freshq_tail, partial_gc_count): Static variables removed.
(freshq): Array renamed to freshobj.
(full): Variable renamed to full_gc.
(freshobj_idx): New varaible.
(make_obj): Add newly born objects to freshobj array rather than
freshq. If freshobj array is full on entry to this function,
trigger gc to empty it. make_obj no longer updates the free_tail;
the gc routine takes care of restoring this invariant.
(mark_obj): Follows rename of full_gc. Some code was not wrapped
in #if CONFIG_GEN_GC.
(mark, sweep_one): Follow rename of full_gc.
(sweep): On entry, restore free_tail invariant in the empty
free_list case. Code which processes freshq from tail to head
replaced by simple array walk of freshobj. Code wrapped properly
in #if CONFIG_GEN_GC.
(gc): Logic for triggering full gc simplified.
Check added for situations when a partial gc is called when
the free list empties, and it doesn't liberate enough memory.
This prevents the situation of partial gc being called over and over
again by make_obj, squeezing less and less memory each time until
finally it returns 0 objects, and more() is called.
(gc_is_reachable): Follows rename of full_gc, and #if CONFIG_GEN_GC
added.
(gc_set, gc_mutated): Simplified. Check if the backptr array
is full and trigger gc if so to flush it, then just add to the array.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* gc.c (BACKPTR_VEC_SIZE): Increase greatly, so that we don't
trigger gc due to overflow of the backptr array. This is not likely
to yield a lot of free objects except in a full GC.
(FULL_GC_INTERVAL): From 10 to 20.
(gc): Take a not of whether or not gc was entered with free_list
being exhausted or not. Call more() only if the free_list was
empty, and a full sweep was done.
Reset partial_gc_count only when a full gc is triggered.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lib.c (lazy_str_force, lazy_str_force_upto): Use set macro
when assigning lim. This won't cause a problem unless lim is
in the bignum range, however.
(acons_new, aconsq_new): When overwriting the cdr value of
the existing entry, use set. This is the smoking gun;
these functions are used for manipulating bindings.
(sort): After sorting a list, we must mark it as having
been mutated. If a list contains only mature conses or only
fresh conses, there is no problem. But if it contains a mixture,
then sorting could reverse their relationship, causing mature
conses to backpoint to the fresh ones.
(obj_init): Use set when installing the t symbol into the user package.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
test suite fails.
* gc.c (FRESHQ_SIZE): New preprocessor symbol.
(backptr_oflow, freshq, freshq_head, freshq_tail): New static
variables.
(make_obj): Place newly allocated generation 0 object into
freshq. If freshq becomes full, transfer oldest item into
generation 1.
(mark_obj): If doing only a partial gc, then do not mark
objects which are not generation 0.
(mark_mem_region): Valgrind support: cannot mark t.type field undefined
because it is a bitfield. Just mark the first SIZEOF_PTR bytes
of the object defined.
(mark): Under partial gc, mark the table of back pointers.
(sweep_one): New static function from the prior guts of sweep.
Reachable objects now get promoted to generation 1.
(sweep): Under partial gc, sweep just the freshq which identifies
the generation 0 objects, rather than the entire linked list of all the
heaps.
(gc): Trigger full gc also if the backptr list has overflowed
due to gc having been disabled.
Under generational gc, reset the static variables afterward:
clear the list of backpointers, and the freshq.
(gc_is_reachable): Under partial gc, report any mature object
as reachable.
(gc_set, gc_mutated): Handle backptr array overflow situation
when gc is disabled.
(gc_push): Bugfix: it is the newly pushed cons cell that has to be
marked as a root, not the value being pushed.
* hash.c (sethash): Use set macro for storing value.
* lib.h (set, mut, mpush): Fix wrong-way #if test for these macros.
The trivial versions were being defined uner CONFIG_GEN_GC and vice
versa!
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* gc.c (gc_push): New function.
* gc.h (gc_push): Declared.
* hash.c (pushhash): Use mpush.
* lib.c (push): Reverted to unsafe operation. TODO comment replaced
with warning.
(lazy_flatten_scan): push occurence commented as safe.
(lazy_stream_func): Unsafe push replaced with mpush.
* lib.h (mpush): New macro.
|