diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-27 19:55:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-27 19:55:46 +0000 |
commit | 320846e8206ce020a038e0f44bd24a18f7b0e881 (patch) | |
tree | fb693659157f36ee2f0fac599f4b659728949668 /Master/texmf-dist/tex/latex/l3experimental | |
parent | ad4ddc33e3bcfed3e2ac7b06a93bc9e61c41d8fb (diff) |
l3 (27may21)
git-svn-id: svn://tug.org/texlive/trunk@59371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental')
9 files changed, 41 insertions, 89 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty index 113dfeaf344..828d0c4c4d8 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty @@ -20,67 +20,8 @@ %% %% File: l3benchmark.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3benchmark}{2021-02-18}{} +\ProvidesExplPackage{l3benchmark}{2021-05-27}{} {L3 Experimental benchmarking} -\sys_if_engine_luatex:TF - { - \cs_new:Npn \__sys_elapsedtime: { } - \cs_new:Npn \__sys_resettimer: { } - \lua_now:n - { - local~gettimeofday = os.gettimeofday~ - local~epoch = gettimeofday() - os.clock()~ - local~write = tex.write~ - local~tointeger = math.tointeger~ - local~id = luatexbase.new_luafunction'__sys_elapsedtime:' - lua.get_functions_table()[id] = function() - write(tointeger((gettimeofday() - epoch)*65536 // 1)) - end~ - token.set_lua('__sys_elapsedtime:', id, 'global') - id = luatexbase.new_luafunction'__sys_resettimer:' - lua.get_functions_table()[id] = function() - epoch = gettimeofday() - end~ - token.set_lua('__sys_resettimer:', id, 'global', 'protected') - } - \cs_new:Npn \sys_timer: - { \__sys_elapsedtime: } - } - { - \cs_if_exist:NT \tex_elapsedtime:D - { - \cs_new:Npn \sys_timer: - { \int_value:w \tex_elapsedtime:D } - } - } -\__sys_const:nn { sys_if_timer_exist } - { \cs_if_exist_p:N \sys_timer: } -\cs_if_exist:NTF \sys_timer: - { - \sys_if_engine_luatex:TF - { - \cs_new_protected:Npn \sys_gzero_timer: - { \__sys_resettimer: } - } - { \cs_new_protected:Npn \sys_gzero_timer: { \tex_resettimer:D } } - } - { - \__kernel_msg_new:nnnn { kernel } { no-elapsed-time } - { No~clock~detected~for~#1. } - { The~current~engine~provides~no~way~to~access~the~system~time. } - \cs_new_protected:Npn \sys_gzero_timer: - { - \__kernel_msg_error:nnn { kernel } { no-elapsed-time } - { \sys_gzero_timer: } - } - \cs_new:Npn \sys_timer: - { - \int_value:w - \__kernel_msg_expandable_error:nnn { kernel } { no-elapsed-time } - { \sys_timer: } - \c_zero_int - } - } \fp_new:N \g_benchmark_duration_target_fp \fp_gset:Nn \g_benchmark_duration_target_fp { 1 } \sys_if_timer_exist:F @@ -89,6 +30,8 @@ \cs_new_protected:Npn \benchmark_once:n #1 { \msg_error:nn { benchmark } { no-time } } \cs_new_eq:NN \benchmark:n \benchmark_once:n + \cs_new_eq:NN \benchmark_once_silent:n \benchmark_once:n + \cs_new_eq:NN \benchmark_silent:n \benchmark_once:n \cs_new_protected:Npn \benchmark_tic: { \msg_error:nn { benchmark } { no-time } } \cs_new_eq:NN \benchmark_toc: \benchmark_tic: @@ -147,8 +90,8 @@ \int_gset:Nn #3 { #1 - \g__benchmark_time_int } \cs_set_eq:NN \__benchmark_tmp:w \prg_do_nothing: } -\fp_new:N \g__benchmark_time_fp -\fp_new:N \g__benchmark_ops_fp +\fp_new:N \g_benchmark_time_fp +\fp_new:N \g_benchmark_ops_fp \int_new:N \g__benchmark_duration_int \int_new:N \g__benchmark_time_int \int_new:N \g__benchmark_time_a_int @@ -159,17 +102,27 @@ \tl_new:N \g__benchmark_code_tl \cs_new_protected:Npn \benchmark_once:n #1 { + \benchmark_once_silent:n {#1} + \__benchmark_display: + } +\cs_new_protected:Npn \benchmark_once_silent:n #1 + { \__benchmark_measure_op: \__benchmark_raw:nN {#1} \g__benchmark_time_int - \fp_gset:Nn \g__benchmark_time_fp { \g__benchmark_time_int / 65536 } - \__benchmark_display: + \fp_gset:Nn \g_benchmark_time_fp { \g__benchmark_time_int / 65536 } + \fp_gset:Nn \g_benchmark_ops_fp { \g_benchmark_time_fp / \g__benchmark_one_op_fp } } \cs_new_protected:Npn \benchmark:n #1 { + \benchmark_silent:n {#1} + \__benchmark_display: + } +\cs_new_protected:Npn \benchmark_silent:n #1 + { \__benchmark_measure_op: \tl_gset:Nn \g__benchmark_code_tl {#1} \__benchmark_aux: - \__benchmark_display: + \fp_gset:Nn \g_benchmark_ops_fp { \g_benchmark_time_fp / \g__benchmark_one_op_fp } } \cs_new_protected:Npn \__benchmark_aux: { @@ -209,7 +162,7 @@ } \prg_break_point: \int_compare:nNnT \g__benchmark_time_int < 3 { \int_gzero:N \g__benchmark_time_int } - \fp_gset:Nn \g__benchmark_time_fp + \fp_gset:Nn \g_benchmark_time_fp { \g__benchmark_time_int / \g__benchmark_repeat_int / 65536 } } \cs_new_protected:Npn \__benchmark_run:N @@ -222,7 +175,7 @@ \tl_gset:Nn \g__benchmark_code_tl { \int_gadd:Nn \g__benchmark_duration_int { 0 } } \__benchmark_aux: - \fp_gset:Nn \g__benchmark_one_op_fp { max(\g__benchmark_time_fp, 1e-16) } + \fp_gset:Nn \g__benchmark_one_op_fp { max(\g_benchmark_time_fp, 1e-16) } \int_gset:Nn \g__benchmark_duration_int { \fp_to_int:n { 65536 * \g_benchmark_duration_target_fp } } } @@ -239,11 +192,10 @@ { \fp_to_tl:n { round(#2 * 1e-#1, 2) } e#1 } \cs_new_protected:Npn \__benchmark_display: { - \fp_gset:Nn \g__benchmark_ops_fp { \g__benchmark_time_fp / \g__benchmark_one_op_fp } \iow_term:x { - \__benchmark_fp_to_tl:N \g__benchmark_time_fp \c_space_tl seconds \c_space_tl - ( \__benchmark_fp_to_tl:N \g__benchmark_ops_fp \c_space_tl ops) + \__benchmark_fp_to_tl:N \g_benchmark_time_fp \c_space_tl seconds \c_space_tl + ( \__benchmark_fp_to_tl:N \g_benchmark_ops_fp \c_space_tl ops) } } \int_new:N \g__benchmark_tictoc_int @@ -269,13 +221,13 @@ \cs_new_protected:Npn \__benchmark_toc: { \int_gdecr:N \g__benchmark_tictoc_int - \fp_gset:Nn \g__benchmark_time_fp + \fp_gset:Nn \g_benchmark_time_fp { ( \sys_timer: - \l__benchmark_tictoc_pop_tl ) / 65536 } \iow_term:x { \__benchmark_tictoc_prefix: TOC: \c_space_tl - \__benchmark_fp_to_tl:N \g__benchmark_time_fp \c_space_tl s + \__benchmark_fp_to_tl:N \g_benchmark_time_fp \c_space_tl s } } \msg_new:nnn { benchmark } { toc-first } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty b/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty index 9d04de5f276..9077b104864 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: l3bitset.dtx -\ProvidesExplPackage{l3bitset}{2021-02-18}{} +\ProvidesExplPackage{l3bitset}{2021-05-27}{} {L3 Experimental bitset support} \cs_new_protected:Npn \bitset_new:N #1 { diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty index a990d35197b..10f5f3617e9 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty @@ -28,7 +28,7 @@ %% %% File: l3draw.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3draw}{2021-02-18}{} +\ProvidesExplPackage{l3draw}{2021-05-27}{} {L3 Experimental core drawing support} \scan_new:N \s__draw_mark \scan_new:N \s__draw_stop diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty index 01c53319537..773ae8d0b89 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty @@ -20,7 +20,7 @@ %% %% File: l3graphics.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3graphics}{2021-02-18}{} +\ProvidesExplPackage{l3graphics}{2021-05-27}{} {L3 Experimental graphics inclusion support} \ior_new:N \l__graphics_tmp_ior \tl_new:N \l__graphics_tmp_tl diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty index 48e81a6f571..0cddeed1d8b 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty @@ -20,7 +20,7 @@ %% %% File: l3str-format.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3str-format}{2021-02-18}{} +\ProvidesExplPackage{l3str-format}{2021-05-27}{} {L3 Experimental string formatting} \cs_generate_variant:Nn \use:nn { nf } \cs_generate_variant:Nn \use:nnn { fnf } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty index fce658def23..395ec4b44f4 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty @@ -20,7 +20,7 @@ %% %% File: l3sys-shell.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3sys-shell}{2021-02-18}{} +\ProvidesExplPackage{l3sys-shell}{2021-05-27}{} {L3 Experimental system shell functions} \scan_new:N \s__sys_stop \quark_new:N \q__sys_nil diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index 6b7e5dd3d68..d7e1a6e6f89 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: xcoffins.dtx -\ProvidesExplPackage{xcoffins}{2021-02-18}{} +\ProvidesExplPackage{xcoffins}{2021-05-27}{} {L3 Experimental design level coffins} \keys_define:nn { coffin } { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty index cb3484818c0..40c9f3cc3e0 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3galley}{2021-02-18}{} +\ProvidesExplPackage{l3galley}{2021-05-27}{} {L3 Experimental galley code} \int_new:N \l__galley_tmp_int \seq_new:N \g__galley_tmpa_seq @@ -539,10 +539,10 @@ \bool_lazy_and:nnTF { \dim_compare_p:nNn \l_galley_total_left_margin_dim = \c_zero_dim } { \dim_compare_p:nNn \l_galley_total_right_margin_dim = \c_zero_dim } - { \tex_parshape:D 0 \exp_stop_f: } + { \tex_parshape:D \c_zero_int } { \tex_parshape:D - 1 \exp_stop_f: + \c_one_int \l_galley_total_left_margin_dim \l_galley_text_width_dim } @@ -731,7 +731,7 @@ \tex_displaywidowpenalties:D \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n - 0 \exp_stop_f: + \c_zero_int } \cs_generate_variant:Nn \galley_display_widow_penalties_set:n { V , v } \cs_new_protected:Npn \galley_widow_penalties_set:n #1 @@ -739,7 +739,7 @@ \tex_widowpenalties:D \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n - 0 \exp_stop_f: + \c_zero_int } \cs_generate_variant:Nn \galley_widow_penalties_set:n { V , v } \cs_new:Npn \__galley_set_aux:n #1 { \int_eval:n {#1} ~ } @@ -760,7 +760,7 @@ \tex_clubpenalties:D \int_eval:n { \clist_count:n {#1} + 1 } \exp_stop_f: \clist_map_function:nN {#1} \__galley_set_aux:n - 0 \exp_stop_f: + \c_zero_int \__galley_calc_interline_penalties: } \cs_generate_variant:Nn \galley_display_club_penalties_set:n { V , v } @@ -789,7 +789,7 @@ \cs_new_protected:Npn \__galley_set_interline_penalty:nn #1#2 { \tex_interlinepenalties:D - \tex_interlinepenalties:D 0 \exp_stop_f: + \tex_interlinepenalties:D \c_zero_int \int_step_function:nN {#1} \__galley_set_interline_penalty_auxi:n \int_step_function:nnN { #1 + 1 } { \tex_interlinepenalties:D 0 - 1 } @@ -820,7 +820,7 @@ \__galley_calc_interline_penalties_auxi:n \int_step_function:nnN { #2 + 1 } { #1 - 1 } \__galley_calc_interline_penalties_auxii:n - \tex_interlinepenalties:D \tex_interlinepenalties:D 0 \exp_stop_f: + \tex_interlinepenalties:D \tex_interlinepenalties:D \c_zero_int } \cs_new:Npn \__galley_calc_interline_penalties_auxi:n #1 { @@ -836,7 +836,7 @@ { \int_eval:n { - \tex_interlinepenalties:D \tex_interlinepenalties:D 0 \exp_stop_f: + \tex_interlinepenalties:D \tex_interlinepenalties:D \c_zero_int + 0 \clist_item:Nn \l_galley_club_penalties_clist {#1} - \tex_clubpenalties:D #1 ~ } @@ -880,7 +880,7 @@ \cs_new:Npn \__galley_save_widow_penalties:n #1 { \int_value:w \tex_widowpenalties:D \int_eval:n {#1} , } \cs_new_protected:Npn \galley_interline_penalty: - { \int_value:w \tex_interlinepenalties:D \tex_interlinepenalties:D 0 \exp_stop_f: } + { \int_value:w \tex_interlinepenalties:D \tex_interlinepenalties:D \c_zero_int } \__kernel_msg_new:nnn { galley } { no-line-to-end } { There's~no~line~here~to~end. } \cs_set:Npn \clearpage diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty index 4fd8c31ac42..f28977c7197 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: xgalley.dtx -\ProvidesExplPackage{xgalley}{2021-02-18}{} +\ProvidesExplPackage{xgalley}{2021-05-27}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist |