diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-07-30 11:53:36 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-07-30 11:53:36 +0300 |
commit | dba454ef54bfc83cc1ade93c668f39ec0a5895d3 (patch) | |
tree | 1ea904c2a08d6258cd28e22138ea789d9eb8d037 /pcre/doc | |
parent | dfd7749120e592299fddf2710bc336ee1000ae07 (diff) | |
download | mariadb-git-dba454ef54bfc83cc1ade93c668f39ec0a5895d3.tar.gz |
8.41
Diffstat (limited to 'pcre/doc')
-rw-r--r-- | pcre/doc/html/pcrejit.html | 57 | ||||
-rw-r--r-- | pcre/doc/html/pcretest.html | 9 | ||||
-rw-r--r-- | pcre/doc/pcre.txt | 49 | ||||
-rw-r--r-- | pcre/doc/pcrejit.3 | 54 | ||||
-rw-r--r-- | pcre/doc/pcretest.1 | 10 | ||||
-rw-r--r-- | pcre/doc/pcretest.txt | 8 |
6 files changed, 166 insertions, 21 deletions
diff --git a/pcre/doc/html/pcrejit.html b/pcre/doc/html/pcrejit.html index 210f1da0262..abb342522f9 100644 --- a/pcre/doc/html/pcrejit.html +++ b/pcre/doc/html/pcrejit.html @@ -79,9 +79,12 @@ API that is JIT-specific. </P> <P> If your program may sometimes be linked with versions of PCRE that are older -than 8.20, but you want to use JIT when it is available, you can test -the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such -as PCRE_CONFIG_JIT, for compile-time control of your code. +than 8.20, but you want to use JIT when it is available, you can test the +values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such as +PCRE_CONFIG_JIT, for compile-time control of your code. Also beware that the +<b>pcre_jit_exec()</b> function was not available at all before 8.32, +and may not be available at all if PCRE isn't compiled with +--enable-jit. See the "JIT FAST PATH API" section below for details. </P> <br><a name="SEC4" href="#TOC1">SIMPLE USE OF JIT</a><br> <P> @@ -119,6 +122,20 @@ when you call <b>pcre_study()</b>: PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE </pre> +If using <b>pcre_jit_exec()</b> and supporting a pre-8.32 version of +PCRE, you can insert: +<pre> + #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32 + pcre_jit_exec(...); + #else + pcre_exec(...) + #endif +</pre> +but as described in the "JIT FAST PATH API" section below this assumes +version 8.32 and later are compiled with --enable-jit, which may +break. +<br> +<br> The JIT compiler generates different optimized code for each of the three modes (normal, soft partial, hard partial). When <b>pcre_exec()</b> is called, the appropriate code is run if it is available. Otherwise, the pattern is @@ -428,6 +445,36 @@ fast path, and if invalid data is passed, the result is undefined. Bypassing the sanity checks and the <b>pcre_exec()</b> wrapping can give speedups of more than 10%. </P> +<P> +Note that the <b>pcre_jit_exec()</b> function is not available in versions of +PCRE before 8.32 (released in November 2012). If you need to support versions +that old you must either use the slower <b>pcre_exec()</b>, or switch between +the two codepaths by checking the values of PCRE_MAJOR and PCRE_MINOR. +</P> +<P> +Due to an unfortunate implementation oversight, even in versions 8.32 +and later there will be no <b>pcre_jit_exec()</b> stub function defined +when PCRE is compiled with --disable-jit, which is the default, and +there's no way to detect whether PCRE was compiled with --enable-jit +via a macro. +</P> +<P> +If you need to support versions older than 8.32, or versions that may +not build with --enable-jit, you must either use the slower +<b>pcre_exec()</b>, or switch between the two codepaths by checking the +values of PCRE_MAJOR and PCRE_MINOR. +</P> +<P> +Switching between the two by checking the version assumes that all the +versions being targeted are built with --enable-jit. To also support +builds that may use --disable-jit either <b>pcre_exec()</b> must be +used, or a compile-time check for JIT via <b>pcre_config()</b> (which +assumes the runtime environment will be the same), or as the Git +project decided to do, simply assume that <b>pcre_jit_exec()</b> is +present in 8.32 or later unless a compile-time flag is provided, see +the "grep: un-break building with PCRE >= 8.32 without --enable-jit" +commit in git.git for an example of that. +</P> <br><a name="SEC12" href="#TOC1">SEE ALSO</a><br> <P> <b>pcreapi</b>(3) @@ -443,9 +490,9 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC14" href="#TOC1">REVISION</a><br> <P> -Last updated: 17 March 2013 +Last updated: 05 July 2017 <br> -Copyright © 1997-2013 University of Cambridge. +Copyright © 1997-2017 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE index page</a>. diff --git a/pcre/doc/html/pcretest.html b/pcre/doc/html/pcretest.html index 839fabf189b..ba540d3c385 100644 --- a/pcre/doc/html/pcretest.html +++ b/pcre/doc/html/pcretest.html @@ -74,6 +74,11 @@ newline as data characters. However, in some Windows environments character 26 maximum portability, therefore, it is safest to use only ASCII characters in <b>pcretest</b> input files. </P> +<P> +The input is processed using using C's string functions, so must not +contain binary zeroes, even though in Unix-like environments, <b>fgets()</b> +treats any bytes other than newline as data characters. +</P> <br><a name="SEC3" href="#TOC1">PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES</a><br> <P> From release 8.30, two separate PCRE libraries can be built. The original one @@ -1149,9 +1154,9 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC17" href="#TOC1">REVISION</a><br> <P> -Last updated: 09 February 2014 +Last updated: 23 February 2017 <br> -Copyright © 1997-2014 University of Cambridge. +Copyright © 1997-2017 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE index page</a>. diff --git a/pcre/doc/pcre.txt b/pcre/doc/pcre.txt index d68d5033ceb..c027538f500 100644 --- a/pcre/doc/pcre.txt +++ b/pcre/doc/pcre.txt @@ -8365,7 +8365,11 @@ AVAILABILITY OF JIT SUPPORT If your program may sometimes be linked with versions of PCRE that are older than 8.20, but you want to use JIT when it is available, you can test the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT - macro such as PCRE_CONFIG_JIT, for compile-time control of your code. + macro such as PCRE_CONFIG_JIT, for compile-time control of your code. + Also beware that the pcre_jit_exec() function was not available at all + before 8.32, and may not be available at all if PCRE isn't compiled + with --enable-jit. See the "JIT FAST PATH API" section below for + details. SIMPLE USE OF JIT @@ -8407,6 +8411,18 @@ SIMPLE USE OF JIT PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE + If using pcre_jit_exec() and supporting a pre-8.32 version of PCRE, you + can insert: + + #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32 + pcre_jit_exec(...); + #else + pcre_exec(...) + #endif + + but as described in the "JIT FAST PATH API" section below this assumes + version 8.32 and later are compiled with --enable-jit, which may break. + The JIT compiler generates different optimized code for each of the three modes (normal, soft partial, hard partial). When pcre_exec() is called, the appropriate code is run if it is available. Otherwise, the @@ -8696,6 +8712,33 @@ JIT FAST PATH API Bypassing the sanity checks and the pcre_exec() wrapping can give speedups of more than 10%. + Note that the pcre_jit_exec() function is not available in versions of + PCRE before 8.32 (released in November 2012). If you need to support + versions that old you must either use the slower pcre_exec(), or switch + between the two codepaths by checking the values of PCRE_MAJOR and + PCRE_MINOR. + + Due to an unfortunate implementation oversight, even in versions 8.32 + and later there will be no pcre_jit_exec() stub function defined when + PCRE is compiled with --disable-jit, which is the default, and there's + no way to detect whether PCRE was compiled with --enable-jit via a + macro. + + If you need to support versions older than 8.32, or versions that may + not build with --enable-jit, you must either use the slower + pcre_exec(), or switch between the two codepaths by checking the values + of PCRE_MAJOR and PCRE_MINOR. + + Switching between the two by checking the version assumes that all the + versions being targeted are built with --enable-jit. To also support + builds that may use --disable-jit either pcre_exec() must be used, or a + compile-time check for JIT via pcre_config() (which assumes the runtime + environment will be the same), or as the Git project decided to do, + simply assume that pcre_jit_exec() is present in 8.32 or later unless a + compile-time flag is provided, see the "grep: un-break building with + PCRE >= 8.32 without --enable-jit" commit in git.git for an example of + that. + SEE ALSO @@ -8711,8 +8754,8 @@ AUTHOR REVISION - Last updated: 17 March 2013 - Copyright (c) 1997-2013 University of Cambridge. + Last updated: 05 July 2017 + Copyright (c) 1997-2017 University of Cambridge. ------------------------------------------------------------------------------ diff --git a/pcre/doc/pcrejit.3 b/pcre/doc/pcrejit.3 index 341403f7c84..3b785f0f631 100644 --- a/pcre/doc/pcrejit.3 +++ b/pcre/doc/pcrejit.3 @@ -1,4 +1,4 @@ -.TH PCREJIT 3 "17 March 2013" "PCRE 8.33" +.TH PCREJIT 3 "05 July 2017" "PCRE 8.41" .SH NAME PCRE - Perl-compatible regular expressions .SH "PCRE JUST-IN-TIME COMPILER SUPPORT" @@ -54,9 +54,12 @@ programs that need the best possible performance, there is also a "fast path" API that is JIT-specific. .P If your program may sometimes be linked with versions of PCRE that are older -than 8.20, but you want to use JIT when it is available, you can test -the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such -as PCRE_CONFIG_JIT, for compile-time control of your code. +than 8.20, but you want to use JIT when it is available, you can test the +values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such as +PCRE_CONFIG_JIT, for compile-time control of your code. Also beware that the +\fBpcre_jit_exec()\fP function was not available at all before 8.32, +and may not be available at all if PCRE isn't compiled with +--enable-jit. See the "JIT FAST PATH API" section below for details. . . .SH "SIMPLE USE OF JIT" @@ -96,6 +99,19 @@ when you call \fBpcre_study()\fP: PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE .sp +If using \fBpcre_jit_exec()\fP and supporting a pre-8.32 version of +PCRE, you can insert: +.sp + #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32 + pcre_jit_exec(...); + #else + pcre_exec(...) + #endif +.sp +but as described in the "JIT FAST PATH API" section below this assumes +version 8.32 and later are compiled with --enable-jit, which may +break. +.sp The JIT compiler generates different optimized code for each of the three modes (normal, soft partial, hard partial). When \fBpcre_exec()\fP is called, the appropriate code is run if it is available. Otherwise, the pattern is @@ -404,6 +420,32 @@ fast path, and if invalid data is passed, the result is undefined. .P Bypassing the sanity checks and the \fBpcre_exec()\fP wrapping can give speedups of more than 10%. +.P +Note that the \fBpcre_jit_exec()\fP function is not available in versions of +PCRE before 8.32 (released in November 2012). If you need to support versions +that old you must either use the slower \fBpcre_exec()\fP, or switch between +the two codepaths by checking the values of PCRE_MAJOR and PCRE_MINOR. +.P +Due to an unfortunate implementation oversight, even in versions 8.32 +and later there will be no \fBpcre_jit_exec()\fP stub function defined +when PCRE is compiled with --disable-jit, which is the default, and +there's no way to detect whether PCRE was compiled with --enable-jit +via a macro. +.P +If you need to support versions older than 8.32, or versions that may +not build with --enable-jit, you must either use the slower +\fBpcre_exec()\fP, or switch between the two codepaths by checking the +values of PCRE_MAJOR and PCRE_MINOR. +.P +Switching between the two by checking the version assumes that all the +versions being targeted are built with --enable-jit. To also support +builds that may use --disable-jit either \fBpcre_exec()\fP must be +used, or a compile-time check for JIT via \fBpcre_config()\fP (which +assumes the runtime environment will be the same), or as the Git +project decided to do, simply assume that \fBpcre_jit_exec()\fP is +present in 8.32 or later unless a compile-time flag is provided, see +the "grep: un-break building with PCRE >= 8.32 without --enable-jit" +commit in git.git for an example of that. . . .SH "SEE ALSO" @@ -426,6 +468,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 17 March 2013 -Copyright (c) 1997-2013 University of Cambridge. +Last updated: 05 July 2017 +Copyright (c) 1997-2017 University of Cambridge. .fi diff --git a/pcre/doc/pcretest.1 b/pcre/doc/pcretest.1 index 92640da8e1b..ea7457c03d0 100644 --- a/pcre/doc/pcretest.1 +++ b/pcre/doc/pcretest.1 @@ -1,4 +1,4 @@ -.TH PCRETEST 1 "09 February 2014" "PCRE 8.35" +.TH PCRETEST 1 "23 February 2017" "PCRE 8.41" .SH NAME pcretest - a program for testing Perl-compatible regular expressions. .SH SYNOPSIS @@ -50,6 +50,10 @@ newline as data characters. However, in some Windows environments character 26 (hex 1A) causes an immediate end of file, and no further data is read. For maximum portability, therefore, it is safest to use only ASCII characters in \fBpcretest\fP input files. +.P +The input is processed using using C's string functions, so must not +contain binary zeroes, even though in Unix-like environments, \fBfgets()\fP +treats any bytes other than newline as data characters. . . .SH "PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES" @@ -1151,6 +1155,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 09 February 2014 -Copyright (c) 1997-2014 University of Cambridge. +Last updated: 23 February 2017 +Copyright (c) 1997-2017 University of Cambridge. .fi diff --git a/pcre/doc/pcretest.txt b/pcre/doc/pcretest.txt index 55de5024431..6d7305cfe82 100644 --- a/pcre/doc/pcretest.txt +++ b/pcre/doc/pcretest.txt @@ -39,6 +39,10 @@ INPUT DATA FORMAT For maximum portability, therefore, it is safest to use only ASCII characters in pcretest input files. + The input is processed using using C's string functions, so must not + contain binary zeroes, even though in Unix-like environments, fgets() + treats any bytes other than newline as data characters. + PCRE's 8-BIT, 16-BIT AND 32-BIT LIBRARIES @@ -1083,5 +1087,5 @@ AUTHOR REVISION - Last updated: 09 February 2014 - Copyright (c) 1997-2014 University of Cambridge. + Last updated: 23 February 2017 + Copyright (c) 1997-2017 University of Cambridge. |