| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* inst.nsi: include .tl files in installer
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/socket.tl (sys:str-inaddr-net-impl): New
argument weff. Overrides prefix. Bugfix here: we must
base the number of octets on the calculated width before
wextra is added to it.
(str-inaddr-net, str-inaddr6-net): New optional width
argument.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/socket.tl (sys:in6addr-condensed-text): New
function containing common code. Uses window-mappend to
selectively convert a compressed range of zeros to either
colon or empty string based on whether it is in the middle
or end.
(str-in6addr, str-in6addr-net): Use new function.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (sock_set_entries): Autload entries for
str-inaddr-net and str-in6addr-net.
* share/txr/stdlib/socket.tl (str-inaddr-net,
str-in6addr-net): New functions.
* txr.1: Documented str-inaddr, str-in6-addr,
str-inaddr-net and str-in6addr-net.
|
|
|
|
|
|
|
|
| |
* lisplib.c (sock_set_entries): Add str-inaddr and str-in6addr
to list of autoload identifiers.
* share/txr/stdlib/socket.tl (str-inaddr, str-in6addr): New
functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* socket.c, socket.h: New files.
* Makefile: include new socket.o among objects if have_objects
variable is defined to 'y'.
* configure (have_sockets): New variable. New configure test
for socket-related functionality.
(HAVE_SOCKETS, HAVE_GETADDRINFO): New configuration
preprocessor symbols.
Also, reordering the shell probing so that /usr/xpg4/bin/sh
is the last fallback. On Solaris, it chokes on some code
that is needed for Solaris.
* lisplib.c (sock_set_entries, sock_instantiate): New static
functions.
(lisplib_init): Register new functions as autoload hooks.
* share/txr/stdlib/socket.tl: New file.
* stream.c (socket_error_s): New symbol variable.
(struct stdio_handle): New members, family and type, helping
stdio streams represent sockets too.
(stdio_stream_mark): Mark new members of struct stdio_handle.
(make_stdio_stream_common): Initialize new members.
(make_sock_stream, stream_fd, sock_family, sock_type,
open_socket, open_sockfd): New functions.
(stream_init): Initialize socket_error_s variable. Register
sock-family, sock-type and open-socket intrinsic functions.
Register socket-error subtype.
* stream.h (socket_error_s, make_sock_stream, stream_fd,
sock_family, sock_type, open_socket, open_sockfd):
Declared.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the initializer expressions for static slots
to instantiate objects, and those instances can rely on
methods being set up.
* share/txr/stdlib/struct.tl (sys:prune-nil-inits): Recognize
:function keyword as denoting a static slot.
(defstruct): Represent methods and functions as (:function
...) items rather than (:static ...) so they can be
distinguished. Function slots appear before other static
slots in the static slot list, and their initializing
code is placed into the the static-initfun lambda of the
sys:make-struct-type call in this order.
* txr.1: Documented.
|
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (defstruct): Issue different
error message for a slot specifier which isn't a symbol,
and wasn't recognized as a special syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE, METALICENSE, Makefile, args.c, args.h, arith.c,
arith.h, cadr.c, cadr.h, combi.c, combi.h, configure,
debug.c, debug.h, eval.c, eval.h, filter.c, filter.h, gc.c,
gc.h, glob.c, glob.h, hash.c, hash.h, jmp.S, lib.c, lib.h,
lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h,
parser.l, parser.y, rand.c, rand.h, regex.c, regex.h,
share/txr/stdlib/cadr.tl, share/txr/stdlib/except.tl,
share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl,
share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl,
share/txr/stdlib/struct.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, stream.c, stream.h, struct.c, struct.h,
sysif.c, sysif.h, syslog.c, syslog.h, txr.1, txr.c, txr.h,
unwind.c, unwind.h, utf8.c, utf8.h: Add 2016 copyright.
* linenoise/LICENSE, linenoise/linenoise.c,
linenoise/linenoise.h: Bump one principal author's copyright
from 2014 to 2015. The code is based on a snapshot of 2015
upstream work.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (place_set_entries): Add with-slots to autoload
name list.
* share/txr/stdlib/struct.tl (with-slots): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
Bumped copyright year in configure.
(Could be last chance this year).
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_iflet_whenlet): Allow the test form
to be an atomic expression instead of bindings.
This allows iflet to be used as the sole target
construct of condlet, while allowing condlet to
have a fallback clause with t. It also means that
an empty list of bindings is allowed (since it
is the atom nil).
* lisplib.c (ifa_set_entries): Add "condlet" to
the autoload names for the ifa module. That's
where we are adding condlet.
* share/txr/stdlib/ifa.tl (sys:if-to-cond): New
macro expander helper function, generalizing the writing
cond-like macros based on if-like operators.
(conda): Rewritten using sys:if-to-cond.
(condlet): New macro.
* txr.1: Documented change in iflet/whenlet.
Documented condlet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (set_origin): New static function.
(eval_init): Register set_origin as sys:set-macro-ancestor.
* share/txr/stdlib/place.tl (sys:pl-expand): Set macro
ancestry when expanding a place macro.
(sys:cp-origin): New function.
(call-update-expander, call-clobber-expander,
call-delete-expander): Use sys:cp-origin to walk through
expanded code and attach the place form as the macro
ancestor of all the getter, setter or deleter calls,
effectively to say that those calls are expansions of
the place, which is approximately the case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Structs can now have code which executes after an object is
initialized, which is useful for doing work like registering
objects in global lists and whatever, when those actions need
access to the initialized slots of the object.
* share/txr/stdlib/struct.tl (defstruct): Handle :posinit
syntax, by generating lambda as eighth argument of sys:make-struct
call.
* struct.c (struct struct_type): New member, postinitfun.
(struct_init): Adjust registrations of make_struct_type
to account for new parameter. The user visible
make-struct-type is registered as having one optional
argument, for backward compat.
(make_struct_type): New argument, postinitfun. Store this
in the structure. For backward compatibility, the argument
is defaulted.
(struct_type_mark): Mark the new postinitfun member.
(call_postinitfun_chain): New static function.
(make_struct, lazy_struct_init): Call call_postinitfun_chain
after slots are initialized, and after the boa function is
called.
* struct.h (make_struct_type): Declaration updated.
* lib.c (time_init): Pass eighth argument to make_struct type.
* sysif.c (sysif_init): Likewise.
* unwind.c (uw_late_init): Likewise.
* tests/012/struct.tl: Update defstruct expansion test case.
* txr.1: Document new argument of make-struct-type,
and clarify ordering of initfun with regard to
other actions. Likewise, document :postinit, and clarify
ordering of :init actions with regard to other actions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (symbol_function): Only retrieve function binding,
and not macro or operator bindings, unless compatibility
<= 127 is in effect.
(symbol_macro): New function.
(fboundp): Only test for existence of function, not
macro or operator, unless <= 127 compatibility is in effect.
(fmakunbound): Do not remove macro binding, unless
compatibility <= 127 is in effect.
(eval_init): Register sys:top-mb variable for use in place.tl
library module. Register symbol-macro intrinsic function.
* share/txr/stdlib/place.tl (sys:get-mb): New function
(symbol-macro): New syntactic place.
* txr.1: Updated incorrect documentation about environments
from the perspective that macros and functions coexist.
Documented symbol-macro. Updated symbol-function, fboundp
and fmakunbound documentation. Added missing documentation
for mmakunbound. Reference to fboundp under define-place-macro
revised to mboundp. Added compatibility notes.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (sys:defmeth): Return
compound method name as return value: (meth <type> <name>).
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/ifa.tl (ifa): Accept dwim expressions
as the condition. Moreover, treat [f x] as a one-argument
call, even though it is the two-argument form (dwim f x).
* txr.1: Documented.
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (defmeth): Return the
symbol being defined.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sethash mistakenly returns a boolean which indicates that the
value was newly added, rather than the documented behavior of
returning the new value.
* hash.c (sethash): return value rather than new_p.
* share/txr/stdlib/place.tl (defplace): The defplace form
now seturn the main symbol of the place being defined,
rather than returning whatever the last sethash call
returns.
(define-place-macro): Likewise.
(sys:register-simple-accessor): Likewise, so that defaccessor
returns the getter function's name.
|
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (sys:defmeth): New function.
Reacts to find-struct-type returning nil.
(defmeth): Logic moved into function.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (place_set_entries): New entry to trigger
autoloading for define-accessor.
* share/txr/stdlib/place.tl (sys:register-simple-accessor):
New function.
(define-accessor): New macro.
* txr.1: Documented define-accessor.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (lnew): New macro.
* struct.c (struct_type): Turn id into a bitfield one bit
smaller than cnum. New Boolean bitfield lazy.
(struct_init): Register make-lazy-struct intrinsic.
(make_struct): Initialize lazy bitfield to zero.
(lazy_struct_init, check_init_lazy_struct): New static
functions.
(make_lazy_struct): New function.
(copy_struct, clear_struct, replace_struct, reset_struct,
lookup_slot, struct_inst_equal, struct_inst_hash):
Call check_init_lazy_struct on all structures involved.
(lookup_slot): Call check_init_lazy_struct.
(struct_inst_mark): If the struct is lazy, it has one
instance slot which must be marked, holding the argfun
function passed into make_lazy_struct.
* struct.h (make_lazy_struct): Declared.
* txr.1: Documented lnew and make-lazy-struct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (struct_init): Register uslot intrinsic function.
(uslot_fun): New static function.
(uslot): New function.
* struct.h (uslot): Declared.
* share/txr/stdlib/struct.tl (usl): New macro.
* lisplib.c (struct_set_entries): Add usl macro.
* txr.1: Documented uslot and usl.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/yield.tl (sys:rcv-item): New struct type.
(sys:obtain-impl): Handle rcv-item, produced by a no-argument
yield-from, which requests an immediate resumption with
the previously given resume value. The reply value
is renamed the resume value.
(yield-from, yield): Form argument is optional.
* txr.1: Rewrote obtain and yield documentation with
lesser focus on implementation and greater focus on
abstract semantics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unwind.c (revive_cont): Don't wrap cons cell around
passed arg; just pass it directly. We don't need
that convention any more.
* capture_cont: Take functional argument. Pass the captured
continuation to the function. If the function returns,
return whatever it returned. When resuming, return the
continuation argument.
(uw_capture_cont): Take functional second argument
and pass to capture_cont. Context form becomes third
argument.
(uw_late_init): Update registration of sys:capture-cont
to three arguments, two required.
* unwind.h (uw_capture_cont): Declaration updated.
* share/txr/stdlib/yield.tl (sys:yield-impl): Not
needed any more; all this was doing was implementing
a call/cc style interface around sys:capture-cont
which can now be used directly.
(yield-from): Use sys:capture-cont directly.
(suspend): Simplified to the point of triviality
with new sys:capture-cont.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (yield_set_entries): Added "suspend" to
end of name.
* share/txr/stdlib/yield.tl (suspend): New macro.
* txr.1: Documented suspend. Replaced subtly incorect
shift/reset implementation example with suspend implementation.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/yield.tl (sys:obtain-impl): Pass
sys:cont-free symbol to each abandoned continuation
to release its stack buffer.
(obtain): Handle the sys:cont-free symbol in the
lambda, so the initial lambda can be treated
uniformly with continuation functions.
* txr.1: Documented sys:obtain-impl.
* unwind.c (sys_cont_free_s): New symbol variable.
(cont_mark): Check for null stack pointer and avoid marking.
(revive_cont): If arg is sys:cont-free, then free the
continuation and return nil. If the continuation has a null
stack buffer, throw an error.
(uw_late_init): Initialize sys_cont_free_s.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/yield.tl (sys:obtain-impl): Add a finalizer
to the returned closure which will feed sys:cont-poison object
to the most recently captured continuation. Thus abandoned
obtain blocks which have become garbage shall have their
unwinding performed.
* txr.1: Documented the finalization behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (sys_abscond_from_s): New symbol variable.
(op_abscond_from): New static function.
(do_expand): Handle abscond-from like return-from.
(eval_init): Initialize sys_abscond_from_s and
register sys:abscond-from operator.
* share/txr/stdlib/yield.tl (yield-from): Use
sys:abscond-from instead of return-from, to avoid
tearing down the continuation's resources that it may
need when restarted.
* txr.1: Documented sys:abscond-from and added
a mention to the Delimited Continuations introduction.
* unwind.c (uw_abscond_to_exit_point): New static function.
(uw_block_abscond): New function.
* unwind.h (uw_block_abscond): Declared.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (yield_set_entries, yield_instantiate):
New static functions.
(dlt_register): Registered new functions.
* share/txr/stdlib/yield.tl: New file.
* txr.1: Documented obtain, yield-from, obtain-block
and yield.
|
|
|
|
|
|
|
|
|
|
|
| |
Expansion of places now gives priority to place macros.
Moreover, it iterates over place macro and ordinary macro
expansion.
* share/txr/stdlib/place.tl (sys:trigger-load): Removed.
(sys:pl-expand): Rewritten.
* txr.1: Documented.
|
|
|
|
| |
* share/txr/stdlib/place.tl (zap): Missing second argument.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (defmeth): New macro.
* struct.c (struct struct_type): New member, dvtypes.
(struct_init): Register static-slot-ensure
intrinsic.
(make_struct_type): Initialize dvtypes of newly instantiated
struct_type struct. If a super is specified, add new type
to the super's dvtypes.
(struct_type_mark): Mark st->dvtypes.
(static_slot_ensure): New function.
* struct.h (static_slot_ensure): Declared.
* txr.1: Documented defmeth and static-slot-ensure.
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (type_set_entries, type_instantiate): New static
functions.
(lisplib_init): Register new functions in dl_table.
* share/txr/stdlib/type.tl: New file, providing typecase
* txr.1: Documented typecase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (handler_bind_s): New symbol variable.
(op_handler_bind): New static function.
(do_expand): Traverse handler-bind forms.
(eval_init): Initialize handler_bind_s variable and register handler-bind
operator.
* lisplib.c (except_set_entries, except_instantiate): New functions.
(lisplib_init): Register new functions in dl_table.
* parser.c (intr_s): New symbol variable.
(repl_intr): Throw exception of type intr, rather than error.
This way we can interrupt accidental exception handling loops involving
exceptions derived from error.
(parse_init): Initialize intr_s.
* share/txr/stdlib/except.tl: New file, defines handle macro.
* unwind.c (uw_push_handler): New function.
(invoke_handler): New static function.
(uw_throw): Search loop looks for and processes handlers in addition to
catches.
* unwind.h (uw_frtype_t): New enum member, UW_HANDLE.
(struct uw_catch): Move member visible so it
is in the same position as in struct uw_handler.
(struct uw_handler): New struct type.
(union uw_frame): New member ha of type struct uw_handler.
(uw_push_handler): Function declared.
* txr.1: Added introductory paragraphs to Exception Handling section.
Documented handler-bind and handle. Some minor errors corrected.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register hash-begin and hash-next intrinsics.
* lisplib.c (hash_set_entries, hash_instantiate): New static functions.
(lisplib_init): Register new tables in dl_table.
* share/txr/stdlib/hash.tl: New file.
* txr.1: Document with-hash-iter macro.
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/struct.tl (defstruct): Rearrange the
generated instance initialization function so that if a :fini
block was specified, it is performed first. Thus if the
remaining initialization code is abandoned, it is possible to
intercept that and invoke the finalizer, which can clean
up any mess left behind.
* txr.1: Document changed order.
|