| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* txr.1: Replace description of make-struct-type's postinitfun
argument which was still claiming that the calls are in
opposite order relative to initfun calls. That changed after
TXR 148 but was documented only for defstruct.
Also updating the compat note for 148.
|
|
|
|
|
| |
* txr.1: Remove spurious parenthesis in syntax synopsis of
make-struct-type.
|
|
|
|
|
| |
* txr.1: grammar fix: S-V number agreement. Add missing
number 2.
|
|
|
|
|
| |
* txr.1: Fix "FFI types short ... long, ulong,"
to "FFI types short ... long and ulong".
|
|
|
|
|
| |
* txr.1: In some parametrized type descriptions, a parameter
is typeset using .code or .codn rather than .meta or metn.
|
|
|
|
|
|
|
| |
* genman.txr (closedtxt, opentxt): Add leading space.
In TOC filtering code, insert the toggle elements
just before the closing </dt> rather than before
opening <a>.
|
|
|
|
|
|
| |
* txr.1: the additional types are given proper headings
so the identifiers are cross referenced and appear in
the TOC.
|
|
|
|
|
|
| |
* txr.1: This change to the buffers heading causes the buf
identifier to be cross-referenced, which is useful to people
browsing the FFI section. Fixing some wording too.
|
|
|
|
|
| |
* txr.1: The FFI cptr type is described in two separate
sections. These are merged and duplication removed.
|
|
|
|
|
| |
* txr.1: The functions and macros in FFI are divided into
logical groups with own section headings.
|
|
|
|
|
|
|
|
| |
PDF page count hits 600!
* txr.1: FFI becomes a major SH section. The FFI types
become separate numbered paragraphs with headings.
Parametrized types look function-like with Syntax headings.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that lambda expressions are supported as function names in
the first position of a compound expression and as an argument
to the fun operator, it will greatly behoove us if we expand
them properly. Then tests/012/quine.tl will pass.
* eval.c (do_expand): Handle fun specially. If the argument
is a lambda expression, then expand that and generate an
expanded fun form, otherwise just yield form. When expanding
function calls, check whether the first argument is a lambda
and expand it.
|
|
|
|
|
|
|
|
| |
The tests fail as of this commit.
* tests/012/quine.expected: New file.
* tests/012/quine.tl: New file.
|
|
|
|
|
|
| |
* txr.1: Clarify an otherwise misleading text. It's true that
the fun operator doesn't resolve macros via straight symbol
names, but it does do so via (macro <name>) syntax.
|
|
|
|
|
| |
* txr.1: Under Compound Forms, specify what is a function
name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (lookup_fun): With this two-liner change, the
forms ((lambda (x) x) 42) and (fun (lambda ()))
just work. This is not just compatibility with other
dialects; it is necessary for consistency with func-get-name,
which already returns lambda expressions, effectively
asserting that they are function names.
* txr.1: Fix documentation for fun operator. The
Dialect Note saying that a lambda expression is not a
function name in TXR Lisp is removed. Document that
function names may be any of those produced by
func-get-name. This has already been true for macros
and methods, just not for lambda expressions.
Under fun-get-name, document that lambda expressions
are produced for interpreted functions not found in
any binding by the previous searches.
|
|
|
|
|
|
| |
* txr.1: The recommendation to use call-super-fun is rounded
out by mentioning that the (meth ...) syntax can achieve the
same thing. An example of it is added under call-super-fun.
|
|
|
|
|
|
| |
* txr.1: call-super-fun method intro paragraph wrongly refers
to call-super-method. Adding example about how to call a base
class method.
|
|
|
|
|
|
|
| |
* txr.1: Recommend call-super-fun for calling a base class
method. Mark call-super-method deprecated, and add a Note
about why it's not correct to use it for the purpose of
calling a base method.
|
|
|
|
|
|
|
|
| |
* struct.c (call_super_fun): Do not allow type to be a struct
instance, which is a consequence of the super function being
used. The documentation says that the argument is a type and
mentions no possibility of it being an instance. Allowing a
struct invites mistakes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (static_slot_rewrite_rec): A simple rearrangement:
switch to postorder traversal, doing the derived structs
first, then this struct. Why does this fix a bug? Because
when the assignment *s = *to occurs for the node at the root
of the recursion, s and from point to the same object. And
so the assignment alters from, which is the search key.
When the children are then processed, the search key doesn't
match anything: it now looks like the to slot that the
children are supposed to get, and so they don't have it, of
course. So in other words the slot being rewritten is not
found in the derived types and not rewritten there as it
should be.
|
|
|
|
|
|
| |
* tests/012/stslot.expected: New file.
* tests/012/stslot.tl: New file. b/tests/012/stslot.tl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (static_sot_ens_rec): This change is in the case
when a static slot is being ensured in a struct type which
already has that static slot by inheritance. In that
situation, the inheritance is severed and the struct gets its
own non-inherited slot of that name. Then all of the derived
structs are scanned. If any contain the original inherited
slot, it is updated to the new, non-inherited one. The bug
here is that we were copying the home_offs field of the
original inherited slot to the new one! This is wrong; the new
slot is not related to the original inherited one. The new
slot is a home slot and its own offset must be home_offs.
We can calculate that simply as its delta from the static slot
table base.
|
|
|
|
|
|
|
|
|
| |
Fixes from review by Joe Eib.
* configure: switch polarity of main return value, so it
doesn't appear confusing, even though the test program is
never run. Remove stray "set -x" command. Fix wrong use of
nonexistent EXTRA_CFLAGS which should be EXTRA_FLAGS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses a failure to build with libffi on
Arch Linux, reported by Joe Eib.
* Makefile (opt/ffi.o, dbg/ffi.o): Pull LIBFFI_CFLAGS
into TXR_CFLAGS for just these object files.
* configure (have_pkgconfig, libffi_cflags): New variables.
(gen_config_make): Create new Makefile variable,
LIBFFI_CFLAGS, from libffi_cflags.
New configure test to detect pkg-config.
Libffi test falls back on using pkg-config to test for
existence of the library and to get the cflags and ldflags.
Any needed cflags end up in LIBFFI_CFLAGS and are used
only when compiling ffi.c.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For convenience, we allow a cptr to be converted to foreign
representation even if its tag doesn't match the FFI type
being used for the conversion. This is allowed only in the
case that the cptr is a null pointer, and its tag is nil.
* lib.c (cptr_handle): Defeat the type check if the pointer
is null, and its tag is nil. Thus, the FFI variable cptr-null
will conveniently convert to any cptr type in the ffi_cptr_put
operation and others.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (make_zstruct): New function.
(ffi_init): Register make-zstruct instrinsic.
* ffi.h (make_zstruct): Declared.
* lisplib.c (ffi_set_entries): Add znew to autload list.
* share/txr/stdlib/ffi.tl (znew): New macro.
* txr.1: Documented make-zstruct and znew.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
| |
* genvim.txr: do syntax coloring for symbols that are
defined as FFI types or are FFI type operators.
Also, include type operators in the Vim lispwords list.
|
|
|
|
|
|
|
|
|
| |
* genvim.txr: remove code which probes a few symbols with
boundp. The point of this is to stimulate some autoloading,
but it is based on a misunderstanding. The symbols in the
lisplib.c autoload module are all interned. When the usr
package is walked, they all get checked with boundp,
and all all library autoloads are triggered.
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (ffi_type_operator_p, ffi_type_p): New functions.
(ffi_init): Register ffi-type-operator-p and ffi-type-p
intrinsics.
* ffi.h (ffi_type_operator_p, ffi_type_p): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* txr.1: The table showing fixed-width delimiting examples
doesn't use the right font and doesn't look good in HTML or
PDF. Let's replace it with just a plain verbatim block, and
clarify the leading text also.
|
|
|
|
| |
* txr.1: Document Ctrl-Z and Ctrl-L working in editing help.
|
|
|
|
|
|
| |
* linenoise/linenoise.c (show_help): Handle Ctrl-Z and Ctrl-L
commands, ensuring that the display stays on the same page
when these are processed.
|
|
|
|
|
| |
* txr.1: New section "Editing Help" under "Interactive
Listener" describing Ctrl-X ?
|
|
|
|
|
|
|
|
|
| |
* ffi.c (make_ffi_type_struct): Fix incorrect shift
calculations, which are still being done from the
unit_offs byte rather than the correct offs byte where
the bitfield is actually placed. It is bit_offs which
has the correct bit offset of the bitfield relative
to offs.
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (make_union): Two arguments added. These
are optional.
(ffi_init): Update registration of make-union as
three-parameter function, with one required arg.
* ffi.h (make_union): Declaration updated.
* txr.1: Documented.
|
|
|
|
|
| |
* ffi.c (ffi_type_compile): Syntax for union type wrongly
using struct symbol rather than union.
|
|
|
|
|
| |
* txr.1: Split mapcar "zipper" example into two lines to
prevent wrapping and add missing -> between form and output.
|
|
|
|
|
|
| |
* ffi.c (ffi_type_compile): Assign full bool syntax to
cloned type, rather than just the argument syntax denoting the
base type.
|
|
|
|
|
| |
* ffi.c (ffi_make_call_desc): Throw error if argument or
return value is a bitfield.
|
|
|
|
|
| |
* ffi.c (ffi_type_compile): Check for too few or too many
arguments in a compound form.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (prod_common): New static function.
(maprodv, maprendv): New functions.
(eval_init): Registered maprod and maprend intrinsics.
* eval.h (maprodv, maprendv): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (enumed_s): New symbol variable.
(ffi_type_compile): New case for enumed type op.
(ffi_init): Initialize enumed_s.
* ffi.h (enumed_s): Declared.
* txr.1: enumed documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lays the groundwork for enumerations based off types
other than int. All we need to do is implement the
syntax for this.
* ffi.c (ffi_enum_put, ffi_enum_get, ffi_enum_rput,
ffi_enum_rget): Retrieve the element type descriptor
and recurse into its put, get, rput and rget operation,
respectively, instead of hard-coded calls to the int
operations.
(make_ffi_type_enum): New argument, base_type.
Numerous properties of the enum type are taken from base_type:
the FFI type, the alignment, size, and alloc, free and
clone operations. The base type is installed as eltype.
(ffi_type_lookup): Static function relocated.
(ffi_type_compile): In the enum case, resolve the int type
and pass to make_ffi_type_enum.
|
|
|
|
|
|
| |
* ffi.c (ffi_enum_put, ffi_enum_rput): Fix function name
appearing in quotes in error diagnostic. Fix nonexistent
member being wrongly reported as nil.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We either mishandle return values, or crash due to
a null rput/rget function pointers on aggregate types
and bools.
* ffi.c (ffi_bool_rput, ffi_bool_rget): New static functions.
(make_ffi_type_pointer, make_ffi_type_struct,
make_ffi_type_union, make_ffi_type_array): Fill in rput and rget.
(ffi_type_compile): Fill in rget and rput for bool with new
functions.
|
|
|
|
|
|
|
|
|
| |
* ffi.c (ffi_varray_null_term_in): Rewrite nonsensical
code that refers to the newly created empty output array
as input. We must perform the in semantics on all the
original elements. Then get semantics on any new elements
if the array was extended, and the copy flag is true
(by-ref nuance).
|
|
|
|
|
|
|
|
| |
* lisplib.c (ffi_set_entries): Add deffi-sym to autload list.
* share/txr/stdlib/ffi.tl (deffi-sym): New macro.
* txr.1: Documented.
|
|
|
|
|
|
| |
* txr.1: Provide the correct description of the syntax
allowed for var-expr; i.e. that deffi-var can be put into
a with-dyn-lib form and all that.
|