| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* lib.h (enum functype): New member, N8.
(struct func): New members n8 and n8v in embedded f struct.
(func_n8, func_n8v, func_n70, func_n8o): Declared.
* lib.c (equal): Handle N8 in switch.
(func_n8, func_n8v, func_n70, func_n8o): New functions.
(generic_funcall): Handle N8 in two switches.
|
|
|
|
|
|
|
|
| |
* lib.c (dwim_set): When the range argument is a
vector or list, it is wrongly hangled through replace, even if
seq is a hash. replace throws since it doesn't handle hashes.
We must treat the vector or list as a hash key and
handle through sethash.
|
|
|
|
|
|
|
| |
* lib.c (replace_list, replace_str, replace_vec): The from
argument must be checked to be a list using listp not consp.
The legacy convention that nil is treated as missing does not
work in this function as it does in sub.
|
|
|
|
|
|
|
|
| |
Requires updated man2html which puts out lower case.
* genman.txr: All matched and generated HTML is lower case.
* txr.1 (NP*): Use lower case h4 tag in M2SS macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue: wrong [+] changes to [-], leading to
inconsistent state.
* genman.txr: In TOC extraction and transformation,
we fix the stupid broken <DT>....<DD> that man2html puts
out and turn it into <DT>...</DT>. This way a DL
now has a DT element as its previous sibling.
(tocjump): When we see a DL now, we get the correct
element which has the expand/collapse: the previous
sibling which is a DT containing the anchor.
|
|
|
|
|
|
| |
* txr.1: Improved wording, better explanation, explanation
that nested macro lists support all features, and
specified meaning of :whole inside nested lists.
|
|
|
|
|
|
|
|
|
| |
* eval.c (bind_macro_params): Remove the restriction that the
:whole and :form do not allow a destructuring pattern,
requring strictly a symbol. Common Lisp's &whole also
does destructuring. As a side effect of this change, the :env
parameter also supports destructuring, thought this isn't
going to be meaningful since macro environments aren't lists.
|
|
|
|
| |
* txr.1: "unless they are the same object."
|
|
|
|
|
|
|
|
| |
txr.1: Lose the useless use of conditional evaluation.
Everything is doable with the meIP macro. Only one piece
of conditional evaluation is needed for different wording:
textual man page says "angle brackets" whereas formatted
page refers to italic font.
|
|
|
|
|
| |
* genvim.txr: Below Contents, place a note for users who
have disabled Javascript.
|
|
|
|
|
| |
* genvim.txr: For some reason, we were generating a second
<title> tag, with different contents.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a section number is clicked, if the table of contents
section which contains it is collapsed, open it, and its
parents.
* genman.txr: (tocjump): New JS function. add onclick action
to jump-back links, which calls tocjump JS function which does
the expansion. The name anchor entries in the TOC are tagged
with a "tocanchor: class so they can be more specifically
selected by the tocjump function.
|
|
|
|
|
|
|
|
|
| |
Section numbers are now hyperlinks which jump back to their
respective table of contents entry.
* genman.txr (toc-tag): New function.
Generate link anchors into section titles.
Generate name anchors in TOC.
|
|
|
|
| |
* txr.1: Remove spurious z in example.
|
|
|
|
|
| |
* txr.1: Structures move under cobj types, which are indicated
with angle brackets to show they are not programmer-visible.
|
|
|
|
| |
* txr.1: more types are listed under typeof.
|
|
|
|
| |
* txr.1: Misuse of << in syntax block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (expand_macro): The expander argument is now
a macro binding, which is a cons cell for built-in
macros written in C also, not only for Lisp-defined
macros.
(symbol_function): Dereference macro binding.
(reg_mac): Construct cons cell binding for built-in
macro instead of sticking it into the table directly.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* configure: re-test for ftello with _LARGEFILE_SOURCE
and add to lang_flags if that works.
|
|
|
|
| |
* configure (lang_flags): Add POSIX_C_SOURCE set to 200112.
|
|
|
|
|
|
|
|
|
|
|
| |
Incorrect, irrelevant handle test inside stdio_get_line
virtual function fails to detect closed stream, leading
to a null pointer passed to the stdio library.
* stream.c (snarf_line): Rewrite according to pattern
followed by the other functions. We must test h->f for
null, not stream->co.handle, which never goes null
until the object is being reclaimed by gc.
|
|
|
|
|
| |
* lib.c (less): Missing test for equality
before comparing to fields.
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* txr.1: Blank line before SYNOPSIS and DESCRIPTION.
|
|
|
|
|
|
|
|
| |
* txr.1: The ifa rules are organized as numbered clauses. The
definition of it-candidate is given up front. Rule 4 is
corrected: the it variable is bound to the argument
expression, not merely its value. Examples refer to rules and
new ones added.
|
|
|
|
|
| |
* txr.1: Remove text fragment, and clarify treatment of not,
null and false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Already we have the situation that there is an if function and
an if macro, and same for and and or.
This change allows such situations to be programmer-defined.
* eval.c (op_defun): Don't remhash the name from the toplevel
macro bindings.
(op-defmacro): Don't remhash the name from the toplevel
function bindings.
* txr.1: Document the permissive behavior as dialect notes
under defmacro and defun.
|
|
|
|
|
|
|
|
|
| |
* eval.c (mboundp, mmakunbound): New static functions.
(eval_init): Registering mboundp and mmakunbound intrinsics.
* txr.1: Documenting new functions. Also clarifying that
fboundp checks for an operator macro binding (not a symbol
macro binding).
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register lookup_origin as macro-ancestor
intrinsic.
* txr.1: Documented.
|
|
|
|
|
| |
* txr.1: formatting fix in syntax section. Added explanation
that macro expansions inherit source loc info from expander.
|
|
|
|
|
| |
* txr.1: TXR pattern language condensed into fewer sections
with deeper nesting. Some sections renamed.
|
| |
|
|
|
|
|
| |
* txr.1: Under dwim operator, describe [...] notation
without asserting that it is preferred.
|
|
|
|
| |
* txr.1: Tense agreement, clarification. Italicize de facto.
|
| |
|
|
|
|
| |
* txr.1: replace colloquial word choice.
|
|
|
|
|
| |
* txr.1: Upgrade text under Callable Objects and Operator
dwim.
|
|
|
|
|
| |
* txr.1: There is no such function as range-regst.
This should be search-regst.
|
|
|
|
|
|
|
|
|
|
|
| |
* regex.c (range_regex): Return range.
(search_regst): Use appropriate accessors on
range returned by range_regex.
* lib.c (tok_where): Destructure range returned by
range_regex, using range_bind.
* txr.1: Documented changed behavior.
|
| |
|
|
|
|
|
|
| |
* genman.txr: TOC extraction code renames Index
to Contents, and adds expand/collapse links.
Javascript added to handle expand/collapse.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.h (struct strm_ops): seek operation's second argument
is now just a val.
* stream.c (unimpl_seek, null_seek): Second argument is a val,
not cnum, to conform with function pointer in stream
structure.
(stdio_seek): Accept offset as val, which could be a fixnum
or bignum. Use new stdio_ftell and stdio_fseek functions
so large values work.
(seek_stream): No need to convert offset argument to cnum;
pass the val directly to seek virtual function.
* sysif.c (off_t_num, num_off_t, stdio_ftell,
stdio_fseek): New functions.
* sysif.h (OFF_T_MAX, OFF_T_MIN): New preprocessor symbols.
(off_t_num, num_off_t, stdio_ftell, stdio_fseek): Declared.
|
|
|
|
|
|
|
|
|
| |
* configure (lang_flags): _XOPEN_SOURCE is bumped from 600 to
700 so that fseeko and ftello are revealed in <stdio.h>
by glibc, and off_t is defined there too.
New configure tests for fseeko/ftello and for detecting
which macro, if any, do we add to lang_flags to enable
large file support (64 bit off_t).
|
|
|
|
| |
* configure (read_syms): Fix bad indentation.
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (static_slot_ensure): Restructured function so that
the subtypes of stype are processed even if stype already has
the static slot. This way static-slot-ensure can be used to
overwrite a static slot value, not only establish one.
And thus defmeth can redefine methods.
* txr.1: Revamped static-slot-ensure doc, and added notes
about redefining to defmeth.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug doesn't affect static slots that are defined in
defstruct, because those get initialized in the new type by
the static init function.
The bug is that the values of static slots added later with
static_slot_ensure are not inherited by subtypes that are
created later still.
(Since static_slot_ensure propagates a slot to subtypes which
already exist, those types get the slot value.)
* struct.c (make_struct_type): Copy the contents of the
static slot array of the supertype into the new type,
so that static slot values are inherited. We can just use
memcpy because the ordering of static slots is the same
in the new type, and the inherited ones precede the
new ones, due to the way the all_slots list is combined.
* txr.1: Clarify inheritance of static slots.
|