| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
|
|
|
| |
with an initial element of 1.
|
|
|
|
| |
with an initial element of zero.
|
|
|
|
|
|
|
|
|
|
|
| |
(NOOP): New macro.
(plus): Use NOOP macro.
(minus, neg): Function moved here from lib.c and rewritten
for bignum support.
* lib.c (minus, neg): Functions removed.
* arith.txr: New file.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* configure (longlong, ulonglong, superlong, usuperlong): Initialize
these variables so that if the detection tests fail, the script
does not access unbound variables.
Avoid adding junk like .bss.* into config.h.
* mpi-patches/config-types: Fixed wrong use of nonexistent
SIZEOF_LONG_T.
|
|
|
|
|
| |
* mpi-patches/config-types: Added missing definitions
of MP_DIGIT_SIZE in two cases.
|
|
|
|
|
| |
* mpi-patches/config-types: Added missing definitions
of MP_DIGIT_SIZE in two cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bignums, based on Michael Fromberger's MPI library, are integrated
into the input syntax, stream output, equality testing, the garbage
collector, and hashing.
The plus operation handles transitions between fixnums and bignums.
Other operations are still fixnum only.
* Makefile (CFLAGS): Add mpi directory to include file search.
(OBJS): Include new arith.o module and all of MPI_OBJS.
(MPI_OBJS, MPI_OBJS_BASE): New variables.
* configure (mpi_version, have_quilt, have_patch): New variables.
Script detects whether patch and quilt are available. Unpacks
mpi library, applies patches. Detects 128 bit integer type.
Records more information in config.h about the sizes of types.
* dep.mk: Updated.
* depend.txr: Make work with paths that have directory components.
* eval.c (eval_init): Rename of nump to fixnump.
* gc.c (finalize, mark_obj): Handle BGNUM case.
* hash.c: (hash_c_str): Changed to return unsigned long
instead of long.
(equal_hash): Handle BGNUM case.
(eql_hash): Handle bignums with equal-hash, but other
objects as eq.
* lib.c (num_s): Variable renamed to fixnum_s.
(bignum_s): New symbol variable.
(code2type): Follow rename of num_s. Handle BGNUM case.
(typeof): Follow rename of num_s.
(eql): Handle bignums using equal, and other types using eq.
(equal): Handle BGNUM case.
(chk_calloc): New function.
(c_num): Wording change in error message: is not a fixnum.
(nump): Renamed to fixnump.
(bignump): New function.
(plus): Function removed, reimplemented in arith.c.
(int_str): Handle integers which are too large for wcstol
using bignum conversion. Base 0 is no longer passed to
wcstol but converted to 10 because the special semantics
for 0 would be inconsistent for bignums.
(obj_init): Follow rename of num_s. Initialize bignum_s.
|
|
|
|
|
|
| |
* eval.c (and_s, or_s): Redundant variables removed.
* match.h (do_s): extern storage class specifier added.
|
|
|
|
|
|
|
|
| |
a named block around it, thereby imitating a Common Lisp feature.
(op_for): Establish an anonymous block around the loop body,
test form and increment forms.
* txr.1: Documented named block in defun. Documented for and for *.
|
| |
|
|
|
|
| |
Blank section for list-vector function added.
|
|
|
|
|
|
|
| |
the arguments. We want (push item list) for compatibility with CL.
(expand): Bugfix: some of the cases were constructing new
forms using unexpanded pieces from the original form.
Added separate case for push, which handles the reversed arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enter stopped working. This was broken by recent bugfixes in the
string splitting functions, which introduced a semantics change.
* eval.c (flip_s, vecref_s): New symbol variables.
(op_modplace): New places (vecref ...) and (flip ...). Bugfix: dec
operator was incrementing.
(expand_place): Handle vecref and flip. Bugfix: pop has no
third argument and so is now handled by the same case as flip.
Bugfix: if a modify form has no third argument, then do not
resynthesize it with a nil third argument.
(eval_init): Initialize new symbol variables.
Register new flip operator. Register new list_vectory function
as intrinsic.
* lib.c (rplacd): When modifying the cdr field of a lazy cons,
then lapse the lazy function to nil! This is needed by user-defined
lazy conses, and it makes sense to do it this way rather than
put in some explicit interface.
(list_vector): New function.
* lib.h (list_vector): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(eval_init): New intrinsics.
* hash.c (struct_hash): assoc_fun parameters reversed.
(gethash, gethash_f, gethash_n): Likewise.
* lib.c (assoc, assq): Reversing parameters.
(find_package, acons_new, acons_new_l, aconsq_new): Reversing
arguments to assoc adn assq.
* lib.h (assoc, assq): Declarations updated.
* match.c (dest_set, dest_bind, h_var, h_coll, h_parallel, h_fun,
subst_vars, do_txeval, v_next, v_parallel, v_gather, v_collect,
v_flatten, v_cat, v_output, v_filter, f_fun, match_funcall):
Reversing arguments to assoc.
* unwind.c (uw_get_func, uw_exception_subtype_p, uw_register_subtype):
Reversing arguments to assoc.
* txr.1: Blank sections created for new functions.
|
| |
|
|
|
|
|
|
| |
* lib.c (chr_toupper, chr_tolower): New functions.
* lib.h (chr_toupper, chr_tolower): New functions declared.
|
|
|
|
| |
IDENT token. This allows for character literals like #\$.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (c_num): Generalized to convert characters to numbers also.
This allows functions like gt and lt to work with characters.
(chr_isalnum, chr_isalpha, chr_isascii, chr_iscntrl, chr_isdigit,
chr_isgraph, chr_islower, chr_isprint, chr_ispunct, chr_isspace,
chr_isupper, chr_isxdigit): New functions added.
* lib.h: (chr_isalnum, chr_isalpha, chr_isascii, chr_iscntrl,
* chr_isdigit, chr_isgraph, chr_islower, chr_isprint, chr_ispunct,
* chr_isspace, chr_isupper, chr_isxdigit): New functions declared.
(c_true): New macro.
|
| |
|
|
|
|
|
|
|
| |
(op_progn): New static function.
(eval_init): Initialize new variable, register progn operator.
* txr.1: progn documented.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
| |
(string_in_get_line): Following up TODO. Fixed broken
function. Now get_line on a string stream properly returns characters
up to and not including the next newlne character, and also consumes
the newline character. Other cases are handled properly, also:
the stream being at EOF already, or at the last line not being
newline-terminated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
warning.
(eval_init): New functions registered: typeof and vector functions,
as well as length_list.
* lib.c (length): Function renamed to length_list, because it is
list specific.
(length_vec, size_vec, vector_list): New functions.
(length): New function, generic over lists, vectors and strings.
* lib.h (length_list, length_vec, size_vec, vector_list): Declared.
* match.c (h_var, h_fun, robust_length, v_deffilter, v_fun): Use
length_list instead of length.
* parser.l: Introduced # token.
* parser.y (vector): New nonterminal.
(expr): vector is a kind of expr.
(chrlist): Bugfix: single-character syntax was not working;
for instance #\x to denote the charcter x.
(lit_char_helper): Use length_list instead of length.
* stream.c (string_in_get_line): Bugfix: this was using
the wrong length function: length was being applied to a string.
The genericity of length makes that correct now, but changing
to length_str anyway.
* txr.1: Blank sections created for functions. Vector syntax
documented.
|
|
|
|
|
| |
* configure: Previous change has to be repeated in one more
place in the script: removing useless eval, treating octal number.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
* configure: Forgot to treat octal number in the processing
of conftest.syms. Removed useless eval.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
| |
(eval_init): Use existing function objects car_f, cdr_f,
eq_f, eql_f and equal_f. Added identity to function table.
* lib.h (eql_f): Missing declaration added.
* txr.1: Documented cond, and, if, or, defun, inc, dec,
set, push and pop.
|
|
|
|
|
|
|
|
| |
(list): Prior commit reversed.
* txr.1: Prior commit reversed.
* RELNOTES: No semantics clarification in quasiquote; bugfixes only.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(expand_qquote): Bugfix: missing case added to handle directly quoted
quasiquote.
(eval_init): Error-catching pseudo-operators registered in
op_table.
* parser.y (force_regular_quotes): New function.
(list): Quotes within unquotes and splices are regular.
* txr.1: Clarified new rules. Removed description of ,'form and ,*'form
special syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): New intrinsic functions.
* lib.c (rplaca, rplacd, lcons_fun): New functions.
(make_lazycons): Renamed to make_lazy_cons, relocated
and turned into external function.
(lazy_stream_func, lazy_stream_cons): Follow rename
of make_lazycons.
* lib.h (rplaca, rplacd, make_lazy_cons, lcons_fun):
Declared.
* txr.1: Stub sections created.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables.
(op_unwind_protect, op_block, op_return, op_return_from):
New static functions.
(expand): Removed case for call, if, and, and or. These operators
evaluate all their arguments, so the code walker can treat them
as a function calls.
Added case for block and return-from.
(eval_init): New symbols interned. New operator functions
registered in op_table.
* txr.1: Blank sections added.
|
|
|
|
| |
the input string.
|
|
|
|
|
|
| |
exposed as intrinsics.
* txr.1: Blank sections created.
|
| |
|
|
|
|
|
|
| |
available:
* lib.h (sym_name): Dangling declaration removed.
|
|
|
|
|
|
|
|
|
|
| |
argument form. If an unquote or splice are applied to a quoted
form, its quote becomes a regular quote.
This behavior is necessary to make ,',form work in nested
quotes, otherwise the ' is a quasiquote which captures
the comma in ,form, reducing ,',form to ,form.
* txr.1: Documented this special behavior.
|
|
|
|
|
|
| |
and processing of regular quote form. This broke nested
backquote processing, and quasiquote forms containing
non-quasi-quotes like like '(a 'b ,c).
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|