diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-05-30 07:38:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-05-30 07:38:12 -0700 |
commit | c5134a9ddba4fd14703d506b0cccd51d823e013e (patch) | |
tree | 1d371e0060f94ceb8fc851872d580183542d9a5d /eval.c | |
parent | 64ba99161ac55d77b09a72a0a64f2333ab7f0ffb (diff) | |
download | txr-c5134a9ddba4fd14703d506b0cccd51d823e013e.tar.gz txr-c5134a9ddba4fd14703d506b0cccd51d823e013e.tar.bz2 txr-c5134a9ddba4fd14703d506b0cccd51d823e013e.zip |
quasistrings: reduce consing.
Quasistrings compile to code that requires on the sys:fmt-join
function to glue strings together. Rewriting that function to
avoid converting its arguments from struct args * to a list.
* eval.c (fmt_join): Static function removed.
* lib.c (cat_str_measure, cat_str_append): more_p parameter
changed to int type, which better matches the C style Boolean
values it takes.
(fmt_join): New external function.
* lib.h: Declared.
* args.h (args_more_nozap, args_get_nozap): New inline
functions allowing multiple iterations over arguments without
making a copy.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -2870,11 +2870,6 @@ static val fmt_flex(val obj, val plist, struct args *args) return do_format_field(fmt_tostring(obj), n, sep, range_ix, plist, nil); } -static val fmt_join(struct args *args) -{ - return cat_str(args_get_list(args), lit("")); -} - val subst_vars(val forms, val env, val filter) { list_collect_decl(out, iter); |