| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* 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, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is time-wasting to have a block in every function. In this
patch we have the compiler eliminate blocks if it is obvious
that they will not be the targets of any exits or continuation
captures through any direct function calls.
If a block contains only calls to library functions,
and doesn't call certain functions, then it is removed.
It is possible for this removal to be strictly wrong
and different from interpreted code. This is true if
the code enclosed in a block invokes a function indirectly or
via a quoted symbol, and that function tries to return from
the block or capture a continuation using that block as
a prompt. Such a call doesn't prevent the block from being
removed.
For instance, this won't work in compiled code
any more:
(defun tricky (fun)
(call fun))
(tricky (lambda () (return-from tricky 42)))
The call function is considered safe; the (call fun)
form doesn't prevent the block inside the tricky
function from being removed.
* share/txr/stdlib/compiler.tl (blockinfo): New struct.
(env): New slot, bb.
(env lookup-block, env extend-block): New methods.
(%block-using-funs%): New global variable.
(compiler comp-block): Implement the elision of the block
based on what free functions are referenced in the body,
and whether the block is referenced lexically.
Also, bind the block in the environment using the bb
member in the env structure.
(comp-return-from): Lookup the block lexically and
mark it as used.
(system-symbol-p): New function.
* txr.1: Document the rules for elision of blocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to the ANSI CL load-time-value.
* eval.c (load_time_s, load_time_lit_s): New symbol variables.
(op_load_time_lit, me_load_time): New static functions.
(eval_init): Intern load-time symbol and sys:load-time-lit.
Register the sys:load-time-lit special operator and load-time
macro.
* share/txr/stdlib/asm.tl (assembler parse-args): We must
now allow the d registers to be the targets of a mov
instruction, because load-time depends on being able to mutate
the data vector, in order to turn the result of a calculation
into a de facto literal.
* share/txr/stdlib/compiler.tl (compiler): New member,
lt-frags.
(compile-in-toplevel): New macro.
(compiler alloc-dreg): New method.
(compiler compile): Handle sys:load-time-lit special form
via comp-load-time-lit method.
(compiler comp-load-time-lit): New method.
(usr:compile-toplevel): Prepend the load-time assembly code
fragments to the compiled assembly code.
* vm.c (vm_set, vm_sm_set): Do not reject an attempt to modify
the static data, since load-time now generates mov
instructions targetting the d registers.
* txr.1: Document load-time.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
| |
* txr.1: Turn the comparison with lexical closures into a
named subsection instead of Notes. Add subsection about
mutated lexical variables and continuations: how the behavior
can differ between interpreted and compiled code. Point user
to the hlet and hlet* macros.
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (yield_set_entries): Add hlet and hlet* to
autoload list.
* share/txr/stdlib/yield.tl (hlet-expand): New function
(hlet, hlet*): New macros.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (usr:compile-toplevel): Support
optional parameter indicating that no expansion is required.
(usr:compile-file): Call compile-toplevel with a t argument
for the new expanded-p parameter, so no further expansion
takes place.
* txr.1: Document new optional parameter of compile-toplevel.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
| |
* txr.1: Update the description of how the printer avoids
ambiguity when making use of the packag fallback list.
|
|
|
|
|
|
| |
* txr.1: Fix places which say that *package* is initialized to
the user package. Under *package*, describe the pub package.
Compat notes added.
|
|
|
|
| |
* txr.1: Document vm-fun-p.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp.c (compiler_set_entries): Add with-compilation-unit to
autoload symbols for compile module.
* share/txr/stdlib/compiler.tl (usr:with-compilation-unit):
New macro.
(usr:compile-file): Use with-compilation-unit macro to
dump warnings if a file is processed alone.
* txr.1: Documented.
|
|
|
|
|
|
| |
* txr.1: Documented force-break and the altered return value of
width-check. The existence of a stream's force flag is
mentioned under width check.
|
|
|
|
| |
* txr.1: Adding description of disassemble function.
|
|
|
|
|
| |
* txr.1: ldiff documentation moved under Sequence Manipulation
and rewritten. Compatibility note added.
|
|
|
|
|
|
| |
* txr.1: Fixed syntax synopsis under struct-type using
structp. Improved some wording here. Fixed static-slot-home's
syntax synopsis wrongly referring to static-slot-ensure.
|
|
|
|
|
| |
* txr.1: Add descriptions of compile-file, compile-only and
eval-only.
|
|
|
|
|
| |
* txr.1: Description of load includes treatment of .tlo files.
New major section on Lisp compilation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Going forward, when : appears as the argument of an optional
parameter in destructuring, it is treated as an ordinary
object, and not as "this argument is missing". That is now a
feature of function calls only.
Rationale: interferes with macros. For instance, the pattern
(test : then else) doesn't correctly express the arguments
of if, because (if x y :) eats the semicolon.
The defaulting behavior is not useful because usually there
is no default value for optional structure, other than nil.
* eval.c (bind_macro_params): Only implement the colon hack
under compatibility with 190.
* share/txr/stdlib/place.tl (defplace gethash, defplace fun,
defplace symbol-function, defplace symbol-macro, defplace
symbol-value): Remove uses of : for defaulting the ssetter
argument. This illustrates how useless the feature is for
macro destructuring; all these just replace with nil.
* txr.1: Clarify that macro parameter lists don't implement
the colon trick. It was never explicitly specified that this
is the case, but could have been inferred from the statements
which indicate that macro parameter lists copy the features of
function parameter lists. Added compat notes.
|
|
|
|
|
|
|
|
|
| |
* txr.1: the each, append-each and all other variants of
operators exhibit inifite looping if the list of bindings is
empty. In that case, the terminating condition that at least
one list is empty, is never true. The behavior is consistent
under compilation and interpretation, so let's just
document it.
|
|
|
|
|
|
|
| |
* txr.1: The described behavior regarding null bytes output
into string output streams is incorrect. In fact they are
effectively dropped by the put-char operation. Let's not
commit to any specific behavior. Also mention pseudo-null.
|
|
|
|
| |
* txr.1: Example isn't about swapping variables.
|
|
|
|
| |
* txr.1: A let in the example should be let*.
|
|
|
|
|
| |
* txr.1: defmacro, macrolet and mac-param-bind syntax
synopses are too wide under 80 column "man txr": breaking up.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the restriction that qualified pkg:sym syntax may not
cause interning to take place if pkg has a nonempty fallback
list. This serves no purpose, only hindering the flexibility
of the package system.
* parser.y (sym_helper): When processing a qualified symbol,
if the package exists, just intern it.
* txr.1: Revise all text which touched on the removed rule,
to remove all traces of it from the documentation.
|
|
|
|
|
|
|
|
|
| |
* arith.c (bignum_len): Wew function.
(arith_init): Register bignum-len intrinsic.
* arith.h (bignum_len): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (reset_struct): Perform the post-init
actions are performed, not only the init actions.
Also, catch exceptions and call finalizers,
just like in a new structure instantiation.
* txr.1: Document the requirements for finalizers
being called by reset-struct, and clarify the issue of
possible duplicate finalization registration.
Add compat notes.
|
|
|
|
|
|
| |
* txr.1: Fix three unrelated occurrences of the
same mistake: "functions is", in reference to
a single function.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_intrinsic_noerr): New function.
* eval.h (eval_intrinsic_noerr): Declared.
* parser.c (listener_greedy_eval_s): New symbol variable.
(repl): Implement greedy evaluation loop, enabled by
the *listener-greedy-eval-p* special.
(parse_init): Intern the *listener-greedy-eval-p* symbol,
storing it in the listener_greedy_eval_s variable.
Register the symbol as a special variable.
* txr.1: Documented *listener-greedy-eval-p* variable
and the greedy evaluation feature that it controls.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (load): Instead of throwing error when a .txr file
is opened, process it according to sensible requirements.
* match.c (v_load): Store bindings in the current environment
frame before evaluating Lisp, and then update afterward.
This allows .txr files loaded from Lisp to continue matching
with the current bindings and extend those bindings.
* txr.1: Update documentation of load.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* txr.1: Add missing text to compensate for text that was
accidentally edited out, regarding the return value of
the empty case of caseq/caseql/casequal.
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (listener_pprint_s): New symbol variable.
(repl): Check new variable after each evaluation and print
accordingly.
(parse_init): Initialize listener_print_s with interned symbol
and register the variable.
* txr.1: Document *listener-pprint-s*.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
| |
* txr.1: Several places in the document refer to a section
called Equality Substitution which supposedly exists under the
Structures section. As of now, it actually does!
|
|
|
|
|
| |
* txr.1: Restructure long sentence for readability, fixing
awkward comma in the process.
|
|
|
|
|
|
| |
* txr.1: Describe fallback of ref and refset onto
list-like operations if lambda/lambda-set are
not supported.
|
|
|
|
| |
* txr.1: "behavior ... becomes" second person agreement.
|
|
|
|
| |
* txr.1: Fix run-on parenthesis.
|
|
|
|
|
| |
* txr.1: a :maxgap of zero also means that the collected items
must match immediately.
|
|
|
|
|
|
| |
Reported by Martin Dvořák.
* txr.1: Word "five" should be "n".
|
|
|
|
|
|
|
| |
Reported by Martin Dvořák.
* txr.1: In pattern matching clauses, repeat and rep are
shorthands for collect and coll.
|
|
|
|
| |
* txr.1: use mono font for @(output).
|
|
|
|
|
|
| |
txr.1: The equivalences between [x i] and some functions like
ref are dynamic; they depend not only on the type ofx, but
also whether i is a range or integer.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Update the documentation to reflect the current
handling of objects, eliminating some contradictions
in the process, like text which says that rplacd is
erroneous on anything but conses and lazy conses, followed by
text which states other kinds of objects are allowed.
The semantics of car and cdr forms as places is described
strictly in terms of rplaca and rplacd, so the mechanism is
then described in one place.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (replace_obj): New static function.
(sub): Handle struct case via lambda method.
(replace): Handle struct case via replace_obj.
* txr.1: Documented.
* tests/012/aseq.tl (add): The lambda method now has to handle
a range argument. One test case uses the last function, which
for non-lists relies on sub, which now calls the lambda method
if the object has one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register rplaca and rplacd using new
rplaca_s and rplacd_s symbol variables.
* lib.c (rplaca_s, rplacd_s): New symbol variables.
(rplaca): Handle struct object via rplaca method, if it has
one, otherwise lambda-set, if it has that, or else error
out.
(rplacd): Handle struct object via rplacd method.
* lib.h (rplaca_s, rplacd_s): Declared.
* txr.1: Documented rplaca and rplacd methods.
|
|
|
|
|
| |
* txr.1: Fix wording under invoke-catch which refers to a
nonexistent function called get-frames.
|