| 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* buf.c (copy_buf): New function.
(buf_init): Register copy-buf intrinsic.
* buf.h (copy_buf): Declared.
* lib.c (copy): Handle BUF via copy_buf.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/asm.tl (op-getf): Rename to op-oldgetf.
This opcode becomes obsolescent.
(op-getf): New opcode.
* share/txr/stdlib/compiler.tl
(assumed-fun): New global variable.
(compiler comp-fun): Use the new getf instruction which takes
a function table index instead of a data table index.
(compiler comp-lisp1-value): Don't use getl1 opcode any more
for dynamic lisp1-style lookup. Instead, we bake the behavior
at compile time perform a function lookup if the symbol is
completely unbound, a variable lookup if it is bound to a
variable (where we decide at compile tie whether it is lexical
or dynamic) or else a function if a function binding exists at
compile time. Also, if we assume that an unbound symbol is a
function, put it on the assumed-fun list.
(compiler comp-dwim): If the first argument is a symbol
with no lexical binding, and is not bound as a variable, then
treat it as a function by transforming the form into a
function call form with that symbol in the car position.
Put the symbol on the assumed-fun list.
(compiler-emit-warnings): New function.
(with-compilation-unit): Call compiler-emit-warnings when
bailing out of most enclosing compilation unit.
(%tlo-ver%): Bump compiled file version to 4, since
we added an opcode.
* vm.c (vm_execute): Follow rename of GETF to OLDGETF.
Implement the new GETF.
* parser.c (read_file_common): Extend version range to allow
version 4 compiled files.
* txr.1: Documented everything.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The functions sys:expand, sys:expand* and
sys:expand-with-free-refs are now in the usr package and
documented for public use.
* eval.c (eval_init): Move registrations of the symbools
expand, expand* and expand-with-free-refs from the
system package to the user package.
* share/txr/stdlib/awk.tl (sys:awk-mac-let, awk): Uses of
sys:expand drop the sys: prefix.
* share/txr/stdlib/op.tl (sys:op-alpha-rename): Likewise.
* share/txr/stdlib/place.tl (call-upudate-expander,
call-clobber-expander, call-delete-expander, sys:placelet-1):
Likewise.
* tests/011/macros-2.txr, tests/012/struct.tl: Likewise.
* txr.1: Documented expand, expand* and expand-with-free-refs.
|
|
|
|
| |
* txr.1: Fix misnamed references to macro parameter.
|
|
|
|
|
|
|
|
|
| |
We don't want ot overwrite the history file in-place; if
something goes wrong, we will lose half of it.
* parser.c (repl): Save the history to a .tmp file, and
then rename that to the target name, if the write is
successful.
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (repl): There is no need to use chk_strdup on the
string inside histfile. We can just use the original string,
since it won't be garbage collected. The existing
gc_hint(histfile) at the end of the function ensures this.
The reason the chk_strdup was done is that originally this
was a utf8_dup_to that I just blindly replaced when the
listener Unicode conversion took place.
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (edit_move_left, edit_move_right,
edit_move_home, edit_move_sol, edit_move_end, edit_move_eol,
edit_move_matching_paren): Use the efficient move_cursor
instead of punching in the new position and calling
refresh_line.
|
|
|
|
|
| |
* linenoise/linenoise.c (move_cursor): Do nothing
if the requested position is current.
|
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (move_cursor): We must update the
oldrow variable, expected by refresh_line to be tracking the
row position of the cursor. This bug doesn't affect the
current use of move_cursor for paren_jump, because that logic
moves the cursor to the original position, which makes the
oldrow value correct, and refresh_line is never called in
between. If we want to use move_cursor in more situations,
this has to be fixed.
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (history_search): The c variable for
capturing the input character should be of type wint_t,
not int. This was caught by GNU C++, due to a signed/unsigned
warning when c was compared to WEOF.
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (move_cursor_multiline, move_cursor):
New functions.
(paren_jump): Use move_cursor rather than refresh_line.
In multi-line mode, this calculates the required cursor
movement and emits the escape sequences to make it happen,
without issuing a refresh, sending way less data to the
terminal.
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (edit_insert): This function is
missing an important optimization for multi-line mode. Let's
add it. Since multi-line mode doesn't scroll horizontally, it
is very simple: if a character is added at the end, there is
no need for refresh.
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (refresh_line): Clear the need_refresh
flag here.
(edit): No need to clear it here any more. This will prevent
some useless calls to refresh_line. Some edit operations set
refresh_line, but then execute something that performs
refresh_line unconditionally. If the flag is then reset, the
top of the loop doesn't have to do another wasteful refresh.
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (col_offset_in_str): Take a cols
parameter and wrap the return value into the number of
columns.
(refresh_multiline): No need to do the % cols operation on the
return value of col_offset_in_str any more; just pass cols
down into it.
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (get_columns): Avoid the situation
that cols is zero or negative. The cols value is involved in a
modulo calculation (position % cols), which requires cols not
to be zero. The situation hasn't been observed; this is just
defensive coding.
|
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (usec_delay): return a Boolean
indicator whether the delay was prematurely canceled by input.
(flash): Use the return value of usec_delay to bail out of the
loop early, canceling the flashing. Instead of doing full
line refreshes to display and hide the exclamation mark,
perform the flash by simply printing the exclamation mark at
the current location and then erasing it with
backspace-space-backspace.
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (stream_init): When stdin is a TTY, we make it
unbuffered. This affects the parenthesis matching and
incomplete line warning flash in the listener, in the
following way. The listener uses the poll function to execute
delays which is canceled by the presence of TTY input. This
logic breaks when data is pasted into the terminal, because
the stdin stream buffers the input.
|
|
|
|
|
|
| |
* parser.c (lino_getch): Catch the exception that is thrown by
get_char when the read fails with EINTR due to the SIGWINCH
interrupt. Convert exception to WEOF return.
|
|
|
|
|
|
| |
* parser.c (catch_all): New static variable.
(provide_atom, repl): Use static catch_all.
(parse_init): Protect catch_all from GC reclamation.
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (complete_line, history_search, edit):
The test c < 0 is not correct. Unlike EOF, WEOF isn't required
to be negative, and in fact in the glibc environment, it
isn't.
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (arith_init): Do not define *flo-dig*, *flo-max*,
*flo-min*, *flo-epsilon*, *pi* and *e* unless compatibility
with TXR 199 or earlier is requested.
* txr.c (txr_main): Likewise for *self-path*.
* txr.1: Compat note added.
|
|
|
|
|
|
| |
* txr.c (txr_main): When establishing self-path with a new
value, use self_path_s instead of calling intern on the symbol
name again.
|
|
|
|
|
|
| |
* txr.1: Square brackets in the graph indicate a
categorization node that is invisible to programs,
not visible.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* genman.txr: show the toggle as "expand all" initially.
Assign the sections of the TOC to the "tocsec" class,
and then select the elements by class rather than by the
dl element type. This avoids selecting the dl that wraps
the entire TOC.
(xpanded): New boolean variable.
(toggleall): Base toggle on boolean variable rather than
the state of the first section dl element.
Toggle the xpanded variable.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Regenerated.
|
|
|
|
|
| |
* hash.c (hash_double): Fix comparison warning between signed
loop variable and unsigned limit expression.
|
|
|
|
|
| |
* genvim.txr: In the Vim syntax file comment's example .vimrc
lines, include .tlo files, which are just TXR Lisp syntax.
|
|
|
|
| |
* txr.1: Fix missing @ for code font.
|
|
|
|
|
|
|
| |
* txr.1: TXR doesn't guarantee backwards compatibility for
handling compiled files, as it does for most aspects of its
operation. This has to documented in its own section.
Also adding a paragraph to COMPATIBILITY to discuss this.
|
|
|
|
|
| |
* txr.1: Document that compile-file evaluates load-time forms
during compilation unless compile-only is used.
|
|
|
|
|
|
|
|
| |
* txr.1: We need a SS section for the compilation functions,
otherwise they appear to be children of the preceding
"Treatment of the Hash Bang Line" section. An alternative
would have been to promote them to a higher section level with
.coSS instead of .coNP.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/op.tl (sys:*op-ctx*) Move definition before
the make-struct-type call which instantiates the sys:op-ctx
structure type, because the variable is referenced in that
expression and treated as lexical. This situation now
generates a warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the compiler has a more efficient treatment of global
lexical variables, code which accesses global variables that
have not yet been defined will misbehave if the intent is to
for those variables to be dynamically scoped.
There is such a bug in the op expander, in fact.
* eval.c (me_def_variable): When defvar/defparm are expanding,
they now check whether there is an outstanding unbound warning
against the variable. If so, then a warning is issued that the
variable was previously used lexically and is now being marked
special.
* unwind.c (uw_warning_exists): New function.
* unwind.h (uw_warning_exists): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (read_file_common): Allow version three
object files.
* share/txr/stdlib/compiler.tl (compiler comp-var): If a
global variable isn't special, then treat it via the getlx
instruction. The symbol gets added to the symtab, and
referenced by index number.
(compiler comp-setq): Similarly, treat a non-special
global variable using the setlx instruction.
(%tlo-ver%): We bump the major version of .tlo files
from 2 to 3, since old txr executables won't recognize
these new instructions. However, we are backward compatible;
hence read_file_common still allows version 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These instructions can be used for accessing cached global
variable bindings through the symtab of the vm descriptor.
The compiler will use these for optimizing access to global
lexical variables.
* share/txr/stdlib/asm.tl (op-getlx, op-setlx): New opcode
classes.
* vm.c (vm_stab): Take the lookup function as an argument,
so this can be used for variable bindings.
(vm_gcall, vm_gapply): Pass lookup_fun function to vm_stab,
as well as the appropriate string for the unbound error.
(vm_gettab, vm_settab): New static functions.
(vm_execute): Implement GETLX and SETLX using vm_gettab and
vm_settab.
* vmop.h: Regenerated.
|
|
|
|
|
|
|
|
|
| |
* vm.c (vm_make_desc): We must register the newly malloced
descriptor structure into the free list before calling cobj,
because calling cobj may trigger gc, which can blow away the
object pointed to by our vtail local variable. Alternatively,
we calculate vtail after doign the cobj. Obtaining vtail and
using it cannot be separated by gc.
|
|
|
|
|
|
|
|
|
| |
* vm.c (struct vm_stent): Rename fb and fbloc members to bind
and bind_loc.
(vm_desc_mark, vm_stab, vm_invalidate_binding): Follow rename.
A local variable in vm_stab is also renamed. The error message
in this function still says "function ... not defined"; that
word will be replaced by a parameter in a later commit.
|
|
|
|
|
|
| |
* txr.1: Document that the list-builder methods which add to
the list have unspecified return values, and that the local
functions set up by the build macro are the same way.
|
|
|
|
|
|
| |
* txr.1: Replace reference to the nonexistent
define-parameter-macro with the correct
define-param-expander.
|
|
|
|
|
|
| |
* txr.1: Remove unnecessary test for the existence of
a field, since the find function accepts nil.
Use len instead of length.
|
|
|
|
|
| |
* txr.1: shorten some examples by replacing (not (equal ...))
with (nequal ...).
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-code-move-check): A symbol
in the sys: package is being used just for the English word
that its name supplies, so print it using ~a so the sys:
prefix doesn't appear.
|
|
|
|
|
|
|
| |
* share/txr/stdlib/compiler.tl (expand-quasi-mods): Fix
misspelled "missing". Small repro test case to trigger
the diagnostic: (compile-toplevel '`@{"" []}`) where,
note, there is nothing between the square brackets.
|
|
|
|
|
|
|
| |
arith.c (signum): New function.
(arith_init): signum intrinsic registered.
* txr.1: Documented.
|
|
|
|
|
| |
* txr.1: Wording change in introductory paragraph. Error in
description of Boolean options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (flo_get_round_mode, flo_set_round_mode): New
functions.
(arith_init): Register global lexical variables flo-near,
flo-down, flo-up and flo-zero.
Register flo-get-round-mode and flo-set-round-mode intrinsic
functions.
* configure: Test for fesetround and fegetround variables,
and the associated constants, prpoducing a HAVE_ROUNDING_CTL_H
variable in config.h.
* txr.1: Documented new variables and functions.
|
|
|
|
|
|
| |
* txr.1: The descriptions of eval, the File Compilation Model
and compile-toplevel give details about the processing of
top-level forms.
|
|
|
|
|
|
| |
* tests/012/man-or-boy.tl (defun-cbn): We no longer need the
macro-time expression here to force the evaluation of the
defmacro form.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonizing with the previous change to eval, the
compiler should also handle those situations.
* share/txr/stdlib/compiler.tl (compile-file): do not perform
a full expansion on each object that it reads from the file
before passing it into the top-level walk. Rather, the
raw form is passed into the top-level walk. It is partially
expanded with macro-expand, and this is repated at each
descent of the recursion. Only forms which are not top-level
forms are then fully expanded before compilation, by not
passing the t argument to compile-toplevel.
|