| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
due to negative hashing values being reduced modulo table size
to a negative array index.
* hash.c (equal_hash, eql_hash): Ensure
that value returned is in the range [0,NUM_MAX].
(hash_obj): Unused function removed.
(cobj_hash_op): Use hashing similar to eql hash for
other kinds of references.
(hash_eql, hash_equal): Removed bogus % NUM_MAX reduction.
* hash.h (hash_obj): Declaration removed.
|
|
|
|
|
|
|
|
| |
* lib.c (copy_vec, sub_vec): New functions.
* lib.h (copy_vec, sub_vec): Declared.
* txr.1: Stub sections created.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
| |
functions.
(expand): New case for quasiliterals.
(eval_init): Register quasi literal as special operator.
* match.c (format_field): Linkage changed to external.
* match.h (format_field): Declared. Declarations rearranged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(eval_init): Registered new functions: symbol-function,
func-get-form, func-get-env, functionp, interp-fun-p.
* lib.c (nappend2, getplist_f, improper_plist_to_alist):
tail variable renamed to avoid clash in macro.
(func_get_form, func_get_env, interp_fun_p): New functions.
* lib.h (func_get_form, func_get_env, interp_fun_p): Declared.
(list_collect): Fix macro not to throw error, but handle the case.
* match.c (vars_to_bindings, extract_bindings): tail variable
renamed to avoid clash in macro.
* txr.1: Documentation stubs.
|
|
|
|
|
|
|
|
| |
* hash.c (equal_hash): Eliminating displacement from character
hashes. Simplifying some code.
(eql_hash): Handle fixnums, characters and literals specially,
rather than hashing all value types the same way. The shift
applicable for object pointers causes adjacent integers to clash.
|
|
|
|
| |
expand on a list of forms.
|
| |
|
|
|
|
| |
(vector_list): Wrong zero used, resulting in vector(nil) being called.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (copy_list): Use list_collect_append rather than
list_collect_terminate.
(append2, appendv): Simplified using new list_collect_append.
(nappend2): Simplified using new list_collect_nconc.
* lib.h (list_collect): Added check for accidental usage
of list_collect after list_append, since PTAIL has different
semantics.
(list_collect_nconc, list_collect_append): Semantics fixed so that
append collecting works more like the Common Lisp append function,
allowing trailing atoms or a lone atom. The meaning of PTAIL is
changed, however. Now PTAIL actually tracks the head of the most
recently appended segment. Each append operation has to first
traverse the previously added piece to get to the end.
(list_collect_terminate): Macro removed.
* match.c (v_gather): Removed useless use of list_collect_terminate.
* parser.y: Some headers added that are needed by list_collect.
* txr.1: Documented append, list, atom, null, not, consp, make-lazy-cons,
lcons-fun, listp, proper-listp, length-list, mapcar, mappend, and apply.
|
|
|
|
|
|
|
|
|
|
|
| |
can now be used. Within nested forms,
Lisp-compatible ; comments are suported.
* parser.l: Support @# and ; comments.
* txr.1: Documentation updated.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
| |
after calling it.
(rplacd): Do not set the lazy cons function to nil
in.
* txr.1: Documented a bunch of functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renamed vec_set_fill to vec-set-length.
* hash.c (equal_hash): vec_fill to vec_length name change.
(hash_grow, make_hash): No need to call vec_set_length.
* lib.c (equal, vecref, vec_push, length_vec, list_vector,
obj_print, obj_pprint): vec_fill to vec_length name change.
(vector): Argument now represents actual length, not just allocated
size.
(vec_get_fill): Function removed; did exactly the same thing
as length_vec.
(vec_set_fill): Function renamed to vec_set_length.
(vector_list): Allocate a 0 length vector initially.
* lib.h (enum vecindex): member changes name from vec_fill
to vec_length.
(vector): Parameter name changed.
(vec_set_fill): Redeclared.
(vec_get_fill): Declaration removed.
* txr.1: Doc stubs updated.
|
|
|
|
|
|
|
|
| |
Ignore the return value of the lazy cons function: do not
return nil if the function returns nil.
This useless behavior was a source of inconvenience in lazy
cons programming, requiring the lazy function to return
non-nil in addition to installing the car and cdr fields.
|
| |
|
| |
|
|
|
|
| |
* txr.1: Finished documenting special operators.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New functions interned.
* lib.c (num_chr, chr_num): New functions.
* lib.h (num_chr, chr_num): Declared.
* txr.1: Documentation stubs.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New functions registered as intrisics.
* lib.h (exptmod, gcd): Declared.
* txr.1: Documentation stubs added.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New functions registered as intrinsics.
* lib.h (evenp, oddp): Declared.
* txr.1: Documentation stub updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(abso, isqrt): New functions.
(isqrt_fixnum): New static function.
* eval.c (eval_init): Registered abs, sqrt and numberp instrinsics.
* lib.c (numberp): New function.
* lib.h (numberp, abso, isqrt): Declared.
* mpi-patches/series: New patch added.
* mpi-patches/faster-square-root: New patch added.
* txr.1: Documentation stubs for new functions.
|
| |
|
|
|
|
| |
(distclean): Remove mpi directory.
|
|
|
|
|
|
|
|
| |
so that obj_t stays four pointers wide.
* mpi-patches/series: New patch added.
* mpi-patches/shrink-mpi-int: New file.
|
|
|
|
|
|
|
|
|
| |
storage class specifier.
* mpi-patches/fix-mult-bug (s_mp_sqr): More braindamage found in MPI.
This function performs additions and multiplication mp_digit,
expecting a mp_word precision result without casting. This function
is needed for exponentiation.
|
|
|
|
|
|
|
|
|
| |
the highest bit, replacing them with an adapation of the
bit searching function used in arith.c.
* mpi-patches/series: Patch added.
* mpi-patches/bit-search-optimizations: New file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Registering new intrinsic functions,
reduce-left, reduce-right and expt.
* lib.c (minusv): Return one instead of num(1).
(exptv, reduce_right): New functions.
* lib.h (expt, exptv, reduce_right): Declared.
* txr.1: Blank sections for new functions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
s_mp_mul_d and added to patch. This one caused malloc corruption and
crashes, because the incorrect arithmetic causes the function
to think that the multiplication will not be needing another
digit, but then there is a carry out which does spill into
a new digit.
* mpi-patches/series: Arg! Somehow the patch fix-bad-shift
went missing from the series file, even though the patch
itself is in the GIT repository.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with bignum support.
* eval.c (eval_init): Added bignump and zerop as intrinsic function.
Renamed numberp to fixnump.
* lib.c (zerop, gt, lt, ge, le): Functions removed.
(numeq): Unused function removed.
* lib.h (numeq): Declaration removed.
* txr.1: Sections for zerop and bignump created. Changed reference
to numberp to fixnump.
|
|
|
|
|
| |
(trunc): Plugged memory leaks. Straightened out semantics
with negative modulus. (Residue comes out negative).
|
|
|
|
|
|
| |
(mod): New function, reimplementation of removed mod from lib.c.
* lib.c (mod): Function removed.
|
|
|
|
|
|
|
|
|
|
|
| |
code like 1 << n, where n exceeds the width of the type int.
* arith.c (trunc): New function, reimplementation of removed
trunc from lib.c.
* lib.c (trunc): Removed.
* mpi-patches/fix-bad-shifts: New file.
|
|
|
|
|
|
|
| |
(plus, minus): Bugfix: must not pass signed values to mp_add_d and
mp_sub_d functions.
(mul): Must not pass signed value to mp_mul_d. Also, fixed type check
on wrong argument in the (TAG_PTR, TAG_NUM) case.
|
| |
|
|
|
|
| |
* arith.txr: File removed.
|
|
|
|
|
| |
* arith.txr (normalize): Bugfix: was not turning +/- NUM_MAX bignums
into fixnums.
|
|
|
|
|
| |
* arith.txr (highest_bit): Missing #else added, fixing
SIZEOF_PTR == 4 case.
|
|
|
|
|
| |
* arith.txr (highest_bit): Oops, half the logic for
the 64 bit case was missing due to to a cut and paste mistake.
|
|
|
|
|
| |
* arith.txr (highest_bit): New function.
(mul): Use highest_bit instead of shift based algorithm.
|
|
|
|
| |
properly and highlighted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c: Regenerated.
* arith.txr (CNUM_BIT): New constant.
(bignum, bignum_dbl_ipt): New static functions.
(@{add-fname}): Use bignum function.
(mul): New functions, rewrite of mul from lib.c.
* lib.c (mul): Function removed.
* mpi-patches/add-mp-set-intptr (mp_set_intptr): Revised patch.
Local variable v should be int_ptr_t not unsigned long.
Also, the mp_set interface doesn't set the sign; it's an unsigned
interface. We must do that ourselves.
* mpi-patches/fix-mult-bug: The main multiplication function is
also broken in the same way, requiring the cast.
* mpi-patches/mpi-set-double-intptr: Fixed use of wrong type for
local variable v.
|
|
|
|
|
|
| |
* mpi-patches/mpi-set-double-intptr: New file.
* mpi-patches/series (mpi-set-double-intptr): Patch added.
|
|
|
|
|
| |
is twice the size of intptr_t. It may not be available, so
there is a HAVE_ macro to detect it.
|
|
|
|
|
|
| |
* mpi-patches/series (mpi-set-mpi-word): New patch.
* mpi-patches/mpi-set-mpi-word: New file.
|
|
|
|
|
|
|
|
| |
* hash.c (hash_eql, hash_equal): New external functions.
* hash.h (hash_eql, hash_equal): Declared.
* txr.1: Sections added.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
low-order bit material from the bignum to fill an unsigned long.
We don't need to walk the entire bignum. If the low order
digit of the bignum is at least as large as an unsigned long,
we just take that as the hash, otherwise we take enough of the
digits to fill an unsigned long. For negative numbers, we just
invert the bits of the hash.
* mpi-patches/add-mpi-toradix-with-case: Refreshed.
* mpi-patches/fix-mult-bug: Refreshed.
|