[latex3-commits] [git/LaTeX3-latex3-latex3] main: Faster conditionals (#822) (a32d72657)

GitHub noreply at github.com
Tue May 4 09:58:10 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/a32d72657fb8ec0091fc8b1a8b825cf08d7fc0e9

>---------------------------------------------------------------

commit a32d72657fb8ec0091fc8b1a8b825cf08d7fc0e9
Author: Skillmon <Skillmon at users.noreply.github.com>
Date:   Tue May 4 09:58:10 2021 +0200

    Faster conditionals (#822)
    
    * Speed up optimized conditionals
    * update tlgs with new names


>---------------------------------------------------------------

a32d72657fb8ec0091fc8b1a8b825cf08d7fc0e9
 l3kernel/l3basics.dtx                    | 11 +++++++----
 l3kernel/testfiles/m3token002.luatex.tlg |  8 ++++----
 l3kernel/testfiles/m3token002.tlg        |  8 ++++----
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index cc2a0b7d6..6cedc2687 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -2085,7 +2085,7 @@
     #8
       { \exp_args:Nc #2 { #4 : #5 T } #6 }
       { { #7 \exp_end: \use:n \use_none:n } }
-      { #7 \exp_after:wN \use_ii:nn \fi: \use_none:n }
+      { #7 \@@_T_true:w \fi: \use_none:n }
   }
 \cs_set_protected:Npn \@@_generate_F_form:wNNnnnnN
     #1 \s_@@_stop #2#3#4#5#6#7#8
@@ -2093,7 +2093,7 @@
     #8
       { \exp_args:Nc #2 { #4 : #5 F } #6 }
       { { #7 \exp_end: { } } }
-      { #7 \exp_after:wN \use_none:nn \fi: \use:n }
+      { #7 \@@_F_true:w \fi: \use:n }
   }
 \cs_set_protected:Npn \@@_generate_TF_form:wNNnnnnN
     #1 \s_@@_stop #2#3#4#5#6#7#8
@@ -2101,9 +2101,12 @@
     #8
       { \exp_args:Nc #2 { #4 : #5 TF } #6 }
       { { #7 \exp_end: } }
-      { #7 \exp_after:wN \use_ii:nnn \fi: \use_ii:nn }
+      { #7 \@@_TF_true:w \fi: \use_ii:nn }
   }
-\cs_set:Npn \@@_p_true:w \fi: \c_false_bool { \fi: \c_true_bool }
+\cs_set:Npn \@@_p_true:w  \fi: \c_false_bool { \fi: \c_true_bool }
+\cs_set:Npn \@@_T_true:w  \fi: \use_none:n   { \fi: \use:n }
+\cs_set:Npn \@@_F_true:w  \fi: \use:n        { \fi: \use_none:n }
+\cs_set:Npn \@@_TF_true:w \fi: \use_ii:nn    { \fi: \use_i:nn }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/testfiles/m3token002.luatex.tlg b/l3kernel/testfiles/m3token002.luatex.tlg
index 346db6dcd..76f693e4c 100644
--- a/l3kernel/testfiles/m3token002.luatex.tlg
+++ b/l3kernel/testfiles/m3token002.luatex.tlg
@@ -157,7 +157,7 @@ FALSE
 ============================================================
 TEST 15: token if space
 ============================================================
-! Argument of \use_ii:nnn has an extra }.
+! Argument of \use_i:nn has an extra }.
 <inserted text> 
 \par 
 l. ...}
@@ -168,7 +168,7 @@ I've just inserted will cause me to report a runaway
 argument that might be the root of the problem. But if
 your `}' was spurious, just type `2' and it will go away.
 Runaway argument?
-! Paragraph ended before \use_ii:nnn was complete.
+! Paragraph ended before \use_i:nn was complete.
 <to be read again> 
 \par 
 l. ...}
@@ -176,7 +176,7 @@ I suspect you've forgotten a `}', causing me to apply this
 control sequence to too much text. How can we recover?
 My plan is to forget the whole thing and hope for the best.
 UE\c_space_token \par 
-! Argument of \use_ii:nnn has an extra }.
+! Argument of \use_i:nn has an extra }.
 <inserted text> 
 \par 
 l. ...}
@@ -187,7 +187,7 @@ I've just inserted will cause me to report a runaway
 argument that might be the root of the problem. But if
 your `}' was spurious, just type `2' and it will go away.
 Runaway argument?
-! Paragraph ended before \use_ii:nnn was complete.
+! Paragraph ended before \use_i:nn was complete.
 <to be read again> 
 \par 
 l. ...}
diff --git a/l3kernel/testfiles/m3token002.tlg b/l3kernel/testfiles/m3token002.tlg
index f1916b639..f5cc94fc7 100644
--- a/l3kernel/testfiles/m3token002.tlg
+++ b/l3kernel/testfiles/m3token002.tlg
@@ -157,7 +157,7 @@ FALSE
 ============================================================
 TEST 15: token if space
 ============================================================
-! Argument of \use_ii:nnn has an extra }.
+! Argument of \use_i:nn has an extra }.
 <inserted text> 
                 \par 
 l. ...}
@@ -168,7 +168,7 @@ I've just inserted will cause me to report a runaway
 argument that might be the root of the problem. But if
 your `}' was spurious, just type `2' and it will go away.
 Runaway argument?
-! Paragraph ended before \use_ii:nnn was complete.
+! Paragraph ended before \use_i:nn was complete.
 <to be read again> 
                    \par 
 l. ...}
@@ -176,7 +176,7 @@ I suspect you've forgotten a `}', causing me to apply this
 control sequence to too much text. How can we recover?
 My plan is to forget the whole thing and hope for the best.
 UE\c_space_token \par 
-! Argument of \use_ii:nnn has an extra }.
+! Argument of \use_i:nn has an extra }.
 <inserted text> 
                 \par 
 l. ...}
@@ -187,7 +187,7 @@ I've just inserted will cause me to report a runaway
 argument that might be the root of the problem. But if
 your `}' was spurious, just type `2' and it will go away.
 Runaway argument?
-! Paragraph ended before \use_ii:nnn was complete.
+! Paragraph ended before \use_i:nn was complete.
 <to be read again> 
                    \par 
 l. ...}





More information about the latex3-commits mailing list.