| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem here is that ensure-stream ignores the mode
argument and decides between "r" and "w". That is incorrect;
the mode could be "a" for append.
The second problem is that the ignored mode strings are
also wrong. For an input pipe, "w" is specified rather than
"r".
* share/txr/stdlib/awk.tl (sys:awk-state ensure-stream): Use
the mode argument. The cases consolidate, because all that
need be distinguished here is file versus pipe.
(sys:awk-mac-let): for the <! redirection (input from pipe),
the mode must be "r", not "w".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case when the :output clause of the awk macro opens a
stream, it isn't closing it. Why don't we treat such a stream
uniformly with redirections.
* share/txr/stdlib/awk.tl (sys:awk-state :postinit):
If a file is opened for output, then don't just install
this file as self.output. Also place it into the self.streams
hash, identified by using the key (:outf <name>), just
like a (-> "name") redirection. This ensures that it will
be closed when the awk macro terminates. It's also potentially
useful in that output redirections referring to the name will
use the same stream.
* txr.1: Documented that streams opened by :output are
closed, and that they are treated uniformly with redirections.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries): Register carray-sub
for autoload.
* share/txr/stdlib/ffi.tl (carray-sub): New place
macro, aliases to sub. This is not 100% correct since
that means it will admit non-carray objects, but
the alternative is to clone the entire sub expander
with a few changes, or else factor out sub expansion
into a shared routine. Bleh ...
* txr.1: Documented. We don't cover up the ruse we
perpetrated, and reveal that it's just a place macro
targetting sub.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TXR Lisp doesn't autoload the definition of places.
For instance if a (set (foo x) y) appears out of the
blue and foo is keyed for autoload, it doesn't happen.
The right place to fix this is to do the autload check
in the place macro expander, since every place form is
tried as a macro.
We need to expose the lisplib_try_load function as a Lisp
intrinsic.
* lisplib.c (lisplib_init): Register sys:try-load
intrinsic, mapped to lisplib_try_load.
* share/txr/stdlib/place.tl (sys:get-place-macro):
New function.
(sys:pl-expand): Use sys:get-place-macro instead of
direct lookup in *place-macro* hash. The new function
tries to autoload the symbol if it finds no place
macro for it.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/conv.tl (sys:conv-let): New
local functions c and cz, using the new #\c
radix conversion.
* txr.1: Documented new extension under the fconv
awk macro. Also fixed a typo here; the b conversion
was exemplified as (c str).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: rng fails to activate when the to and from condition
are true for the same record.
* share/txr/stdlib/awk.tl (sys:awk-mac-let): Rename the flag-new
gensym holder to flag-act, since it indicates whether the range
is active, either from before or due to being activated by
the current record. A new gensym is added to indicate whether
the range is being deactivated in this record. The inclusive
rng range refers to this variable rather than flag-old.
But a bug emulation is provided to refer to the wrong variable.
* txr.1: Added compatibility note.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (ffi_alignof, ffi_offsetof, ffi_arraysize,
ffi_elemsize, ffi_elemtype): New functions.
(ffi_init): Registered intrinsics ffi-alignof, ffi-offsetof,
ffi-arraysize, ffi-elemsize, ffi-elemtype.
* ffi.h (ffi_alignof, ffi_offsetof, ffi_arraysize,
ffi_elemsize, ffi_elemtype): Declared.
* lisplib.c (ffi_set_entries): New autoload entries alignof,
offsetof, arraysize, elemsize, elemtype.
* share/txr/stdlib/ffi.tl (alignof, offsetof, arraysize,
elemsize, elemtype): New macros.
* txr.1: Documented new functions and macros.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries): Autload entry for "deffi-var".
* share/txr/stdlib/ffi.tl (deffi-var): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* share/txr/stdlib/ffi.tl (deffi): Since the arity of
a foreign function is fixed, generate a fixed-argument
defun. This provides a better check on the number of
arguments than letting ffi-call detect it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (ffi_call_wrap): Take struct args * parameters
rather than a list. Check that number of arguments
matches required number from call desc. No need
to build argument array any more; we just refer to
the one in args. Also, the first two parameters
are reversed for consistency with other functions.
(ffi_init): Update registration of ffi-call to
reflect type change.
* ffi.h (ffi_call_wrap): Declaration updated.
* txr.1: Documented ffi-call.
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries): Add carray-ref to list of
autoload names.
* share/txr/stdlib/ffi.tl (carray-ref, carray-refset):
Registered function pair as a simple accessor.
* txr.1: Updated carray-ref doc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state loop):
Wrap a loop around around the two forms that
split the record into fields and dispatch the main
rule function. The loop repeats if the named
block returns :awk-again.
(sys:awk-mac-let): New local macro (again)
which bails out of the :awk-rec block just like (next) does,
but specifies :awk-again as the return value.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries): Add "ffi" to autoload name
list.
* share/txr/stdlib/ffi.tl (ffi): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/ffi.tl (typedef): New macro.
* lisplib.c (ffi_set_entries): Add typedef to autoload
name list.
* txr.1: Doc update. Remove mentions of deffi-type,
though it continues to work.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (stuct txr_ffi_closure): New member, abort_retval.
(ffi_closure_mark_op): Mark the new member.
(ffi_closure_dispatch_safe): Implement the abort_retval.
If it is not nil, use put to place the value into the
return buffer. There is a risk that this could also throw
an exception, which is no longer protected: programer's
problem.
(ffi_make_closure): New abort_ret_in argument, which is
defaulted and stored.
(ffi_init): Update registration of ffi-make-closure to
reflect new argument.
* ffi.h (ffi_make_closure): Declaration updated.
* share/txr/stdlib/ffi.tl (sys:deffi-cb-expander):
Add abort-retval parameter; insert into ffi-make-closure
call.
(deffi-cb): Take optional abort-retval expression;
pass it down to the expander function.
(deffi-cb-unsafe): Pass nil as abort-retval down to expander.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want, by default, for callbacks to capture delimited
continuations across foreign code, or perpetrate non-local
transfers across foreign code. Here, we take an approach
similar for what was done in ftw_wrap.
* ffi.c (s_exit_point): New global variable with internal
linkage.
(ffi_call_wrap): If s_exit_point isn't nil, then it means that
the callback intercepted a nonlocal transfer and stored its
exit point. We resume the transfer to that exit point instead
of returning normally.
(ffi_closure_dispatch_safe): New static function.
(ffi_make_closure): Support a new argument which indicates
whether to make a closure which uses
ffi_closure_dispatch_safe, or ffi_closure_dispatch.
(ffi_init): Update registration of ffi-make-closure intrinsic.
* ffi.h (ffi_make_closure): Declaration updated.
* share/txr/stdlib/ffi.tl (sys:deffi-cb-expander): New
function.
(deffi-cb): Macro internals replaced by call to new
function.
(deffi-cb-safe): New macro.
* txr.1: Documentation of ffi-make-closure updated.
New deffi-cb-unsafe macro documented.
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries, ffi_instantiate): New static
functions.
(lisplib_init): Register auto-loading of ffi.tl.
* share/txr/stdlib/ffi.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This achieves two objectives. The obvious one is that we get
a diagnostic for new expressions that name a nonexistent type,
due to a typo, before those expressions are executed.
However, this also fixes an annoying issue: spurious warnings
about nonexistent slots, related to structs which have not
yet been autoloaded. A test case for this is an expression
like (let ((b (new list-builder))) b.(add 42)). Because
list-builder is auto-loaded, the add slot doesn't exist.
But (new list-builder) doesn't trigger that auto-load; so
the deferred warning about the nonexistent slot isn't
suppressed. With this change, the existence check in
(new list-builder) will trigger the auto-load for the module
which defines list-builder, causing the add slot to exist
before the b.(add 42) expression is visited by the expander.
* share/txr/stdlib/struct.tl (sys:check-struct): New function.
(new, lnew): Issue warning if the type doesn't exist.
|
|
|
|
|
|
| |
* share/txr/stdlib/yield.tl (suspend): The body forms
must be inserted into a progn, because sys:abscond-from
just takes one optional value to evaluate.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* share/txr/stdlib/termios.tl (termios go-raw):
Fix call to nonexistent method.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When tracing for two or more functions is enabled in a single
trace form, the the function tracing hooks print the wrong
name for all but the rightmost function.
* share/txr/stdlib/trace.tl (sys:trace): Fix code which
assumes that the each operator binds fresh lexical variables
on each iteration. Bind a fresh lexical variable lex-n which
copies the current value of the loop variable n, and refer
to this lexical out of the tracing lambda.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implementing warning for the situaton when the qref, uref, usl
and umeth macro operators are asked to refer to a slot that
doesn't exist in any struct type. This won't catch errors
referencing a slot on the wrong type, but it will catch slots
that are misspelled in such a way that the typo doesn't land
on any slot.
* share/txr/stdlib/struct.tl (defstruct): Register tenative
slot definitions for all slots to nuke warnings.
(sys:check-slot): New function.
(qref, usl, umeth): Check slots with sys:check-slot.
(uref): Drop :whole argument, which is unused.
(defmeth): Register tentative definition for slot.
* struct.c (slot_s, static_slot_s): New symbol variables.
(slot_type_hash, static_slot_type_hash): New hash tables,
associating symbols with lists of struct type names
in which they are defined.
(struct_init): Initialize and gc-protect hashes.
Initialize new symbols, interning in system package.
Register new intrinsic funtions sys:slot-types and
sys:static-slot-types.
(make_struct_type): Register slots in new hashes.
(static_slot_ens_rec): Register new slow in static
slot hash.
(slot_types, static_slot_types): New functions,
registered as intrinsics.
(slot_type_reg, static_slot_type_reg): New functions.
* struct.h (print_s): Declared.
(slot_s, static_slot_s): Declared.
(slot_types, static_slot_types, slot_type_reg,
static_slot_type_reg): Declared.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tracing module should warn when traced functions or
methods are being redefined, and stop tracing the original
methods.
* eval.c (trace_check): New function. Calls
sys:trace-redefined-check if the trace module has been
loaded, otherwise does nothing.
(op_defun, op_defmacro): Call trace_check to have a warning
issued for a redefined traced function or macro.
* eval.h (trace_check): Declared.
* lisplib.c (trace_loaded): New global variable.
(trace_instantiate): Flip trace_loaded to t.
* lisplib.h (trace_loaded): Declared.
* share/txr/stdlib/trace.tl (sys:trace-redefine-check): New
function. Checks two situations: traced function or method
is redefined (neither old nor new is traced any longer),
and traced method is overridden (base method continues to be
traced, override is not traced).
* struct.c (static_slot_ensure): Do a trace check here,
taking care of defmeth.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a method is traced that is actually derived from
another struct type, we convert the (meth ...) name
to refer to that type and issue a warning.
* share/txr/stdlib/trace.tl (sys:trace-canonicalize-name): New
function.
(sys:trace): Canonicalize name, and trace the canonicalized
name. Warn if it is different from the original name.
(sys:untrace): Likewise for untracing.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now it is possible to use a leading dot on the referencing
dot syntax. This is the is the "unbound reference dot". It
expands to the uref macro, which denotes an unbound-reference:
it produces a function which takes an object as the argument,
and curries the reference implied by the remaining arguments.
* eval.c (uref_s): New global symbol variable.
(eval_init): Intern uref symbol and init uref_s.
* eval.h (uref_s): Declared.
* lib.c (simple_qref_args_p): A qref expression is now
also not simple if it contains an embedded uref, meaning
that it cannot be rendered into the dot notation without
ambiguity.
(obj_print_impl): Support printing (uref a b c) as .a.b.c.
* lisplib.c (struct_set_entries): Add uref to the list of
autoload triggers for struct.tl.
* parser.l (DOTDOT): Consume any leading whitespace as part
of recognizing the DOTDOT token. Otherwise the new rule
for UREFDOT, which matches (mandatory) leading space
will take precedence, causing " .." to be scanned wrong.
(UREFDOT): Rule for new kind of dot token, which is
preceded by mandatory whitespace, and isn't consing
dot (which has mandatory trailing whitespace too,
matched by an earlier rule).
* parser.y (UREFDOT): New token type.
(i_dot_expr, n_dot_expr): New grammar rules.
(list): Handle a leading dot on the first element of a list as
a special case. Things are done this way because trying to
work a UREFDOT into the grammar otherwise causes intractable
conflicts.
(i_expr): The ^, ' and , punctuators are now followed by
an i_dot_expr, so that the expression can be an unbound
dot.
(n_expr): Same change as in i_expr, but using n_dot_expr.
Plus new UREFDOT n_expr production.
* share/txr/stdlib/struct.tl (uref): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deferrable warnings now get their own subtype, defr-warning.
The tag is a regular argument: no funny dotted argument list.
* eval.c (eval_defr_warn): Throw new style deferrable warning.
(me_op, no_warn_expand): Catch defr-warning rather than
warning. Use uw_muffle_warning to suppress it.
(gather_free_refs): Parse new representation of deferrable
warning.
(expand_with_free_refs): Catch defr-warning rather than
warning.
* lib.c (defr_warning_s): New symbol variable defined.
(obj_init): Initialize defr_warning_s.
* lib.h (defr_warning_s): Declared.
* share/txr/stdlib/error.tl (compile-defr-warning): Throw
new-style deferrable warning.
* unwind.c (uw_muffle_deferrable_warning): Function removed.
(uw_throw): Bugfix: handle warnings by checking by subtype
rather than exactly for the warning type. Distinguish
deferrable warnings by subtype rather than argument list
shape.
(uw_defer_warning): Take the new style args and reconstruct
the (msg . tag) representation for a deferred warning, so
the other functions don't have to change.
(uw_late_init): Register defr-warning as exception subtype
of warning.
* unwind.h (uw_muffle_deferrable_warning): Decl removed.
* txr.1: Adjusted all documentation touching on the subject
of the representation of deferrable warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improving the new feature to handle functions also,
and improve the diagnostic by reporting the specific
to or from subform of which contains the reference.
* share/txr/stdlib/awk.tl (sys:awk-code-move-check): Take a
an argument indicating the kinds of bindings being checked,
symbols or functions, and an extra form argument.
(sys:awk-mac-let): Pass new arguments to
sys:awk-code-move-check and also call it two more times
to report on functions also.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The awk macro abruptly relocates rng forms out of their
apparent scope. Therefore, code like this is wrong:
(awk ((let ((x t))
(rng t x))
(action)))
The rng form is transformed and relocated to a scope in which
the let is not visible. This is a problem worth warning about.
In the above case, there will also be a warning about the
variable x being unbound, which might alerts the programmer
to the problem. However, in cases where there is yet another
binding of x introduced via :let or outside of awk, that
warning wll not occur: the code motion will silently cause
x to refer to the wrong x:
(awk (:let (x nil))
((let ((x t))
(rng 1 x)) ;; refers to the (x nil) binding!!!
(action)))
(let ((x nil))
(awk ((let ((x t))
(rng 1 x)) ;; refers to the (x 4) binding!!!
(action))))
Now there is a warning for this situation.
* share/txr/stdlib/awk.tl (sys:awk-compile-time): New slot,
outer-env.
(sys:awk-expander): Takes an env parameter, which is stored
into the new slot of the awk-compile-time structure.
(sys:awk-code-move-check): New function.
(sys:awk-mac-let): Use sys:expand-with-free-refs to expand
the rng forms, capturing the extra information which enables
the implementation of the warning. The rng variants are
refactored to pass the original form to the sys:rng
expander. This allows the diagnostic to display the original
rng form.
(awk): Parameter e renamed to outer-env, and passed to
sys:awk-expander.
|
|
|
|
|
|
| |
* share/txr/stdlib/error.tl (compile-warning): Wrap throw in a
catch with a continue handler to properly implement the
warning protocol.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
We have ifa and conda; whena is conspicuously absent.
* lisplib.c (ifa_set_entries): Add autoload entry for whena.
* share/txr/stdlib/ifa.tl (whena): New macro.
* txr.1: Documented whena.
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/place.tl (call-update-expander,
call-clobber-expander, call-delete-expander): On entry into
these functions, propagaet the ancestry info to the original
unexpanded body, not only into the final expanded body. This
way, if errors go off during the expansion of the original,
the diagnostic will have access to the info.
Test case: (flet ((f ())) (set (fun f) 4)). With this patch
we trace to (fun 4) and its location.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sys:cp-origin blindly propagates macro origin into a
tree structure, and has to perform a complicated circularity
check to avoid introducing cycles
We replace it with a new function which looks only for
invocations of the local setter, getter or deleter macros
within the tree structure and sets the macro origin only
into those forms.
* share/txr/stdlib/place.tl (sys:cp-origin): Function removed.
(sys:propagate-ancestor): New function.
(call-update-expander, call-clobber-expander,
call-delete-expander): Use new function.
|
|
|
|
|
|
|
|
| |
* eval.c (eval-exception): Call uw_dump_deferred_warnings
before throwing exception. The warnings could provide valuable
clues about the cause of the error.
* share/txr/stdlib/error.tl (compile-error): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a special variable hack to pass down the
request to treat a form as Lisp-1 if it happens to be a
symbol, we now wrap the form in ^(sys:l1-val ,form). We
define sys:l1-val as a place. In the case when form is a
symbol with no lexical binding, requiring the special Lisp-1
treatment, sys:l1-val produces ^(sys:lisp1-value, form).
We define that as a place also, and that takes care of
everything.
* share/txr/stdlib/place.tl (sys:*lisp1*): Special variable
removed.
(sys:sym-update-expander, sys:sym-clobber-expander): Do not
test sys:*lisp1*; just produce a sys:setq form for updating a
symbolic place.
(call-update-expander, call-clobber-expander,
call-delete-expander): Drop the bugfix in the previous commit:
re-binding of sys:*lisp1* to nil
(defplace sys:l1-val, defplace sys:lisp1-value): New places.
(defplace dwim): Do not bind sys:*lisp1*. Wrap obj-place
in a sys:l1-val form, thereby annotating it so that it
receives the right sort of place expander.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This underscores why sys:*lisp1* is so hacky and should be
removed. When we obtain the update, clobber or delete expander
of a place which is the argument of a DWIM, requiring Lisp-1
treatment, we bind the sys:*lisp1* special. This alters the
behavior of obtaining an expander for a symbolic place.
Unfortunately, because call-update-expander (and friends)
use sys:expand, all levels of the form are subject to place
expansion with sys:*lisp1* bound to t.
Example:
(set [(car (inc a 2)) 10] "foo")
Here, the (car ...) form is the place operand of the DWIM
operator, and so sys:*lisp1* is set up around getting its
expander. But then, oops, the a in (inc a 2) is also treated
as Lisp-1, wrongly.
These changes band-aid the situation.
* share/txr/stdlib/place.tl (call-udpate-expander,
call-clobber-expander, call-delete-expander): After retrieving
the expander, bind sys:*lisp1* to nil so that its effect does
not spill over into the sys:expand call which we apply to the
expansion; i.e. reset sys:*lisp1* to nil around recursive
expansion so that the Lisp-1 treatment is confined to depth 1.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state loop): Allow an input
source to be a list of strings, which is converted to a
stream.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* share/txr/stdlib/except.tl (catch): Expand the parameters
and body of each clause with sys:expand-params to get
rid of parameter macros. Then insert the leftmost gensym.
This now allows parameter macros to be used in cach clauses.
|