summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* * lisplib.c (ifa_set_entries): Add conda.Kaz Kylheku2015-06-211-0/+22
| | | | | | | | * share/txr/stdlib/ifa.tl (conda): New macro. * tests/012/ifa.tl: Adding test for conda. * txr.1: Documenting conda.
* * genman.txr: Rewrite the man2html-generated inner name links with hashKaz Kylheku2015-06-201-0/+7
| | | | | | values derived from the title text, so that when sections are inserted or deleted, the URL's remain stable. The PREAMBLE is gone, and VERSION is collected when processsing the body.
* * genman.txr (month-name): Filter removed.Kaz Kylheku2015-06-201-0/+5
| | | | Page date is converted to a time value, and later formatted.
* Remove places.h generation hack.Kaz Kylheku2015-06-201-0/+16
| | | | | | | | | | | | | | * Makefile (GEN_HDRS, LISP_TO_C_STRING): Variables removed. (%.h: %.tl): Rule removed. The place.h header is no longer generated from place.tl. * lisplib.c (place_instantiate): Load place.tl from stdlib directory, rather than obtaining it from a string literal in generated header place.h. * place.tl: Moved to share/txr/stdlib directory. * genvim.txr: Refer to place.tl in stdlib.
* * eval.c (eval_init): Register have function, synonym of true.Kaz Kylheku2015-06-201-0/+6
| | | | * txr.1: Document have.
* * txr.1: Documented ifa.Kaz Kylheku2015-06-191-0/+9
| | | | | | | * share/txr/stdlib/ifa.tl: Tightened up the tests for situations when the macro is ill-formed, following the improved specification. Also, eval-error is thrown instead of just error.
* Test ifa macro.Kaz Kylheku2015-06-191-0/+11
| | | | | | | | | * Makefile (TEST_OUT): Include .tl files. (tst/%.out): New rule variant, from .tl prerequisite. * tests/012/ifa.expected: New file. * tests/012/ifa.tl: New file.
* * parser.c (parser_mark): Do not mark p->syntax_tree ifKaz Kylheku2015-06-191-0/+6
| | | | | its value is nao. Introduced on 2015-06-10, "Error handling improvement in read".
* * lib.c (mkstring): Fix neglect to null terminate.Kaz Kylheku2015-06-181-0/+4
|
* * lib.c (cat_str): Detect overflow in the total lengthKaz Kylheku2015-06-181-0/+5
| | | | calculation.
* Improvements in equal hashing function.Kaz Kylheku2015-06-181-0/+9
| | | | | | | * hash.c (equal_hash): For conses and vectors, ensure that distinct permutations lead to different hash codes. This is done by accumulating the partial hash with a multiplier, rather than just adding subhashes.
* Library .txr files become .tl and are autoloaded.Kaz Kylheku2015-06-181-0/+19
| | | | | | | | | | | | | | | | | * lisplib.c (ver_set_entries, ver_instantiate, txr_case_set_entries, txr_case_instantiate): New static functions. (lisplib_init): Register new functions. * share/txr/stdlib/txr-case.txr: Reduced to a load for the corresponding .tl file, retained for backward compatibility. * share/txr/stdlib/ver.txr: Likewise. * share/txr/stdlib/txr-case.tl: New file, based on previous contents of corresponding .txr file. * share/txr/stdlib/ver.tl: Likewise.
* Adding anaphoric ifa macro.Kaz Kylheku2015-06-171-0/+22
| | | | | | | | | | | | | | | | | | | | * Makefile (install): Install .tl files present in stdlib directory. (INSTALL): Handle argument 2 being a list. * eval.c (load): New function. * eval.h (load): Declared. * lisplib.c (ifa_set_entries, ifa_instantiate): New functions to lazily load ifa.tl. (lisplib_init): Register new functions. * txr.c (stdlib_path): New variable. (sysroot_init): Store the stdlib path in stdlib_path. * txr.h (stdlib_path): Declared. * share/txr/stdlib/ifa.tl: New file.
* Refactoring of lisplib.cKaz Kylheku2015-06-171-0/+13
| | | | | | | | | | | * lisplib.c (set_dlt_entries): New static function. (set_place_dlt_entries): Renamed to place_set_entries. Uses set_dlt_entries as subroutine. (place_instantiate): Argument changes from table to function, which is invoked to null out the hash entries. (dlt_register): New static function. (lisplib_init): Use dlt_register to register dynamic loading of places_tl.
* Version 108.txr-108Kaz Kylheku2015-06-131-0/+12
|
* * txr.1: Documented Lisp loading.Kaz Kylheku2015-06-131-0/+4
|
* New --lisp option: treat unsuffixed files as Lisp.Kaz Kylheku2015-06-131-0/+7
| | | | | * txr.c (help): Added help text. (txr_main): Handle lisp option.
* * txr.c (txr_main): Handle Lisp files.Kaz Kylheku2015-06-131-0/+4
|
* Lisp load macro.Kaz Kylheku2015-06-131-0/+9
| | | | | | | * eval.c (sys_load_s): New symbol variable. (sys_load, me_load): New static functions. (eval_init): Initialize sys_load_s, register sys:load intrinsic function and load macro.
* @(load) and @(include) now load Lisp code.Kaz Kylheku2015-06-121-0/+13
| | | | | | | | | | | * match.c (v_load): Check txr_lisp_p flag coming out of open_txr_file and handle the Lisp case usin read_eval_stream. * parser.c (read_eval_stream, get_parser, parser_errors): New functions. * parser.h (read_eval_stream, get_parser, parser_errors): Declared.
* Preparing for lisp loading.Kaz Kylheku2015-06-101-0/+15
| | | | | | | | | | | | | * parser.c (open_txr_file): Rewritten to take new argument which indicates whether to treat an unsuffixed file as TXR or TXR Lisp, and is updated to indicate which is the case by looking at the suffix. * parser.h (open_txr_file): Declaration updated. * match.c (v_load): Follow change in open_txr_file. * txr.c (txr_main): Likewise.
* Error handling improvement in read.Kaz Kylheku2015-06-101-0/+12
| | | | | | | | | | * parser.y (spec): New grammar production to handle the cases that SECRET_ESCAPE_E is not followed by anything (the input ends before any object is scanned, or there is no input token which starts an object). * parser.c (lisp_parse): Deal with EOF indication from parser (the syntax_tree member of parser_t set to nao).
* * parser.y (yybadtoken): Print unexpected characterKaz Kylheku2015-06-101-0/+5
| | | | literally rather than as a Lisp character literal.
* Code simplification.Kaz Kylheku2015-06-081-0/+7
| | | | | * txr.c (txr_main): Replacing two code blocks with single call to existing open_txr_file function.
* Critical bugfix for weak hashes.Kaz Kylheku2015-06-071-0/+9
| | | | | | | * hash.c (hash_mark): Hash tables which have both weak keys and values were not added to the reachable_weak_hashes list, and thus not subject to complete hash processing, leading to corruption.
* * lib.h (mkloc): Rename misleading argument from fun to obj.Kaz Kylheku2015-06-071-0/+4
|
* * parser.c (stream_parser_hash): New static variable.Kaz Kylheku2015-06-071-0/+19
| | | | | | | | | | | | | | | | | | (parser_mark): Mark parser and primer members. (parser, ensure_parser): new argument: primer. (get_parser_impl, ensure_parser): New static functions. (prime_parser): New function. (lisp_parse): Multiple calls to this function on the same stream now logically continue the parse, not resetting the line number to 1. (parse_init): Initialize and gc-protect stream_parser_hash. * parser.h (parser_t): New members, primer and parser. (prime_parser): Declared. (parser): Declaration updated. * parser.y (parse): Now responsible for calling prime_parser.
* * match.c (v_load): Call parse_once rater than parse.Kaz Kylheku2015-06-071-0/+15
| | | | | | | | | | | | | * parser.c (regex_parse): Likewise. * txr.c (txr_main): Likewise. * parser.h (parse): Declaration updated. (parse_once): Declared. * parser.y (parse_once): New function, same as old parse implementation. (parse): Becomes one argument function which works with a previously initialized parser and continues the parse.
* * stream.c (catenated_stream_p, catenated_stream_push): New functions.Kaz Kylheku2015-06-071-0/+9
| | | | * stream.h (catenated_stream_p, catenated_stream_push): Declared.
* * txr.1: Document new syntactic places framework and place-mutating macros.Kaz Kylheku2015-05-251-0/+4
|
* Fix mismanaged dyn_env variable.Kaz Kylheku2015-05-251-0/+12
| | | | | | | | | | * eval.c (bindings_helper): In the parallel binding case, only allocate a new dynamic env when it is needed (because a special variable is being bound), rather than unconditionally. Consequently, only modify dyn_env when the dynamic environment actually needs to be extended. Constructs that use bindings_helper are only wrapped in the dynamic environment save/restore form sys:with-saved-vars if they bind special variables.
* Ligher weight debug instrumentation.Kaz Kylheku2015-05-221-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This speeds up the TXR Lisp interpreter, because do_eval sets up a debug frame and uses debug_return. * debug.c (debug_block_s): Symbol removed. (debug_init): Remove initialization of debug_block_s. * debug.h (debug_block_s): Declaration removed. (debug_enter): Do not establish a named block or a catch block; no time-wasting unwind stack manipulation at all. The debug_depth variable is managed by the extended setjmp context now. Provide a return value variable, and a well-defined name to branch to to exit from the debug block. (debug_return): Do not use heavy-weight uw_block_return; simply set the return variable and branch to debug_return_out label. * signal.h (EJ_DBG_MEMB, EJ_DBG_SAVE, EJ_DBG_REST, EJ_OPT_MEMB, EJ_OPT_SAVE, EJ_OPT_REST): New macros. (extended_jmp_buf): Define optional global state variables using EJ_OPT_MEMB. (extended_setjmp): Save and restore optional globals using EJ_OPT_SAVE and EJ_OPT_RESTORE. Now debug_depth is saved and restored if debugging support is compiled in. * match.c (open_data_source): Remove bogus debug_return invocations which were uncovered here by changes to the macro. * eval.c (do_eval, expand_macro): debug_return must now be after debug_end, because it won't dynamically clean up frames that it doesn't know about. The set_dyn_env is no longer unreachable in expand_macro; it is now necessary because debug_return isn't doing the longjmp that previously restored dyn_env.
* Adding pushnew.Kaz Kylheku2015-05-221-0/+6
| | | | | | * place.tl (pushnew): New macro. * lisplib.c (set_place_dlt_entries): Add pushnew.
* symbol-function, symbol-value and fun become places.Kaz Kylheku2015-05-221-0/+11
| | | | | | | | | * eval.c (op_setqf): New function. (eval_init): Register sys:setqf operator. Also expose global variable hash tables via sys:top-vb and sys:top-fb. * place.tl (sys:get-fb, sys:get-vb): New functions. (fun, symbol-function, symbol-value): New places defined.
* Introduce defparm operator.Kaz Kylheku2015-05-211-0/+10
| | | | | | | | * eval.c (me_defparm): New function. (eval_init): Register defparm. * txr.1: Documented defparm together with defvar. defvar documentation is revised.
* Represent place.tl more compactly in image.Kaz Kylheku2015-05-191-0/+11
| | | | | | | | | The contents of place.tl are now stored as a UTF-8 ordinary literal instead of a wide char literal. * Makefile (LISP_TO_C_STRING): Generate plain literal. * lisplib.c: Convert plain literal to string.
* Variables are now deletable places, if they are global.Kaz Kylheku2015-05-151-0/+8
| | | | | | * place.tl (sys:sym-delete-expander): New function. (get-delete-expander): Retrieve delete expander for symbols.
* * eval.c (symbol_value): Retrieve the binding of a symbolKaz Kylheku2015-05-151-0/+10
| | | | | | | | | | macro also. (boundp): Return t for symbol macros. (makunbound, fmakunbound): New functions. (eval_init): Register makunbound and fmakunbound. * txr.1: Document changes to symbol-value and boundp, and add dialect notes about the different semantics of binding.
* * lib.c (replace_list, replace_str, replace_vec): HandleKaz Kylheku2015-05-141-0/+9
| | | | | | | | the case when from is a vector, for consistency with the sel function and the dwim operator. * txr.1: Document that the third argument of select and replace may be a vector.
* Recursive lcons force bug (keep-if*, remove-if*).Kaz Kylheku2015-05-131-0/+7
| | | | | * lib.c (rem_lazy_func): Do not access the cdr field of the lcons that we are in the middle of forcing!
* * place.tl (define-modify-macro): New macro.Kaz Kylheku2015-05-131-0/+6
| | | | * lisplib.c (set_place_dlt_entries): Add define-modify-macro.
* * place.tl (push): Ensure left-to-right eval order.Kaz Kylheku2015-05-131-0/+4
|
* * place.tl (rlet): For the sake of sane evaluation orderKaz Kylheku2015-05-121-0/+6
| | | | | in the face of unknown side effects, do not thread symbolic references; only propagate constants.
* * eval.c (env_vb_to_fb): Allow null env argument. ThisKaz Kylheku2015-05-121-0/+5
| | | | case occurs when (flet () ...) is expanded.
* DWIM places must use Lisp-1 semantics.Kaz Kylheku2015-05-121-0/+24
| | | | | | | | | | | | | | | | | | | | This really only affects code which does something like (set [f x] y) and f resolves as a function. (The TXR Program bent over backwards to install a mutable object into a function binding.) In this situation, we need to update the function binding f, rather than some variable f. * eval.c (op_lisp1_setq, op_lisp1_value): New static functions. (eval_init): Register sys:lisp1-setq and sys:lisp1-value special forms. * place.tl (sys:*lisp1*): New special variable. (sys:sym-place-update-expander, sys:sym-place-clobber-expander): React to sys:*lisp1* variable by doing symbol access using Lisp-1 semantics, with help of newly introduced special forms. (dwim): Bind sys:*lisp1* to true, if main argument is a symbolic place, so that the update is done using Lisp-1 semantics. Use the sys:lisp1-value operator when evaluating arguments.
* * eval.c (lookup_var_l): Gut this function of its sillyKaz Kylheku2015-05-121-0/+8
| | | | | | | reimplementation of lookup_var. (op_setq): Use lookup_var instead of lookup_var_l. Now only outside modules use the lookup_var_l interface. Error message fix: sys:setq, not setvar.
* Handle vectors and strings in rplaca and rplacd.Kaz Kylheku2015-05-111-0/+8
| | | | | | * lib.c (rplaca, rplacd): Use refset and replace respectively to handle vectors and strings. Adjust type mismatch error message.
* * lib.c (chr_str_set): Check for literal strings.Kaz Kylheku2015-05-111-0/+4
|
* Fix argument count checking regression.Kaz Kylheku2015-05-111-0/+8
| | | | | | * eval.c (apply): Revert some changes from 2015-03-13 which cause the too many arguments case not to be diagnosed.
* * place.tl (errno): Support (errno) form as place.Kaz Kylheku2015-05-101-0/+4
|