summaryrefslogtreecommitdiffstats
path: root/protsym.c
Commit message (Collapse)AuthorAgeFilesLines
* Version 199.txr-199Kaz Kylheku2018-10-281-168/+168
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated. * protsym.c: Regenerated.
* opip, oand: rewrite in Lisp.Kaz Kylheku2018-07-161-176/+174
| | | | | | | | | | | | | | | | | * eval.c (opip_s, oand_s, chain_s, chand_s): Variables removed. (me_opip): Function removed. (eval_init): Initializations of removed variables removed. chain and chand symbols interned at point of function registration. * lisplib.c (op_set_entries): Add autoload entries for opip and oand. * share/txr/stdlib/op.tl (sys:opip-expand): New function. (opip, oand): New macros. * protsym.c: Regenerated.
* op: convert to Lisp trivial macros related to op.Kaz Kylheku2018-07-161-144/+142
| | | | | | | | | | | | | | | | | | | | | | | The op macro is no longer written in C, but the trivial macros ap, ip, ado, ido, ret and aret are still C. It's silly to have macros written in C, baked into the TXR executable, which just produce syntax for a complicated macro written in Lisp that must be autoloaded when that code is used. * eval.c (ap_s, apf_s, ipf_s, ret_s, aret_s): Variables removed. (me_ap, me_ip, me_ado, me_ido, me_ret_aret): Functions removed. (eval_init): Do not initialize removed variables. Remove registration for macros ap, ip, ado, ido, ret and aret. Intern the apf and ipf symbols in the same expression which registers these functions. * lisplib.c (op_set_entries): Add autoload entries for ap, ip, ado, ido, ret and aret. * share/txr/stdlib/op.tl (ap, ip, ado, ido, ret, aret): New macros. * protsym.c: Regenerated.
* Version 198.txr-198Kaz Kylheku2018-07-061-124/+124
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated. * protsym.c: Regenerated.
* interpreter: correct semantics of special var args.Kaz Kylheku2018-05-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch we eliminate the special operator sys:with-dyn-rebinds, and implement correct semantics for dynamically scoped variables that occur in argument lists. * eval.c (with_dyn_rebinds_s): Symbol variable removed. (bind_args): Handle special variables dynamically: for each symbol that appears, check whether it is a special and treat accordingly by allocating a new dynamic environment if necessary, and binding in that environment. This adds overhead, which is why I moved away from this approach in the past. But now that there is a compiler, overhead in the interpreter matters less. Correct semantics is more important. (expand_params): Greatly simplified for not having to wrap the sys:with-dyn-rebinds operator around the body. (funcall_interp): Since bind_args can now extend the dynamic environment, it is necessary to save and restore dyn_env around it. Another call to bind_args occurs in op_catch; that already saves and restores dyn_env. (op_with_dyn_rebinds): Static function removed. (do_expand): with-dyn-rebinds-s case removed. (eval_init): Removed interning of sys:with-dyn-rebinds symbol and registration of special op. * protsym.c: Regenerated. * compiler.tl (compiler compile): Remove case which handles sys:with-dyn-rebinds.
* Version 193.txr-193Kaz Kylheku2018-04-261-100/+102
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 192.txr-192Kaz Kylheku2018-04-191-152/+152
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 191.txr-191Kaz Kylheku2018-04-101-46/+46
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* structs: get rid of sys:slot and sys:static-slot.Kaz Kylheku2018-04-061-1/+1
| | | | | | | | | | | | | | | | * share/txr/stdlib/struct.tl (defstruct, sys:check-slot, defmeth): Use slot rather than sys:slot as indicator in tentative defs. * struct.c (static_slot_s): Variable removed. (struct_init): slot_s initialized with symbol in user package, rather than system package. Initialization of static_slot_s removed. Existing slot function now registered using slot_s. (static_slot_type_reg): Remove reference to static_slot_s. This was a dud all along; nothing publishes deferred warnings against this symbol. * protsym.c (protected_sym): Remove static_slot_s.
* Version 190.txr-190Kaz Kylheku2018-02-181-104/+106
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Copyright year bump 2018.Kaz Kylheku2018-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * LICENSE, LICENSE-CYG, METALICENSE, Makefile, args.c, args.h, arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h, combi.c, combi.h, configure, debug.c, debug.h, eval.c, eval.h, ffi.c, ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S, lib.c, lib.h, lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h, parser.l, parser.y, protsym.c, rand.c, rand.h, regex.c, regex.h, share/txr/stdlib/awk.tl, share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl, share/txr/stdlib/conv.tl, share/txr/stdlib/doloop.tl, share/txr/stdlib/error.tl, share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl, share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl, share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl, share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl, share/txr/stdlib/package.tl, share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl, share/txr/stdlib/pmac.tl, share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl, share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl, share/txr/stdlib/termios.tl, share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl, share/txr/stdlib/with-resources.tl, share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl, signal.c, signal.h, socket.c, socket.h, stream.c, stream.h, struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h, syslog.c, syslog.h, termios.c, termios.h, txr.1, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, win/cleansvg.txr: Extended Copyright line to 2018.
* cleanup: harmonize lisp1-eval-related symbol variables.Kaz Kylheku2018-02-141-2/+2
| | | | | | | | | | | | | | * eval.c (sys_lisp1_value_s): Declaration moved to be collocated with lisp1_setq_s. (lisp1_setq_s): Variable renamed to sys_lisp1_setq_s to match sys_lisp1_value_s. (do_expand): Follow rename of lisp1_setq_s. (eval_init): Follow rename; collocate initialization of vars. * protsym.c (lisp1_setq_s): Manually renamed to sys_lisp1_setq_s instead of full regeneration, which we do at release time.
* Version 189.txr-189Kaz Kylheku2018-02-061-56/+58
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 188.txr-188Kaz Kylheku2017-12-191-142/+144
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 185.txr-185Kaz Kylheku2017-08-301-6/+6
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 184.txr-184Kaz Kylheku2017-08-231-192/+192
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 183.txr-183Kaz Kylheku2017-07-191-138/+138
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 182.txr-182Kaz Kylheku2017-07-091-116/+118
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 181.txr-181Kaz Kylheku2017-07-011-138/+138
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 180.txr-180Kaz Kylheku2017-06-251-176/+176
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 179.txr-179Kaz Kylheku2017-06-181-100/+100
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 178.txr-178Kaz Kylheku2017-06-121-199/+193
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 177.txr-177Kaz Kylheku2017-06-071-54/+62
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 176.txr-176Kaz Kylheku2017-05-211-180/+238
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Version 175.txr-175Kaz Kylheku2017-05-151-152/+168
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim, protsym.c: Regenerated.
* Protect internal symbols from uninterning.Kaz Kylheku2017-04-151-0/+209
Issue: TXR holds numerous symbol references in global variables, like list_s. These variables are not registered as root pointers with the garbage collector. This is normally okay because symbols are reachable via packages. However, if such a symbol is uninterned, that causes an integrity problem. Solution: protect those symbols from being removed from their packages. * Makefile (OBJS): Add protsym.o. * genprotsym.txr, protsym.c: New files. * lib.c (prot_sym_check): New static function. (use_sym, uintern, rehome_sym): Use prot_sym_check to implement a defense against internal symbols being booted out of their package.