Add -jitverify to pcre2test.

This commit is contained in:
Philip.Hazel 2017-04-08 15:35:27 +00:00
parent 7afe4e4110
commit f0126dc7ae
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
.TH PCRE2TEST 1 "04 April 2017" "PCRE 10.30"
.TH PCRE2TEST 1 "08 April 2017" "PCRE 10.30"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@ -196,6 +196,11 @@ compiled pattern is given after compilation.
Behave as if each pattern line has the \fBjit\fP modifier; after successful
compilation, each pattern is passed to the just-in-time compiler, if available.
.TP 10
\fB-jitverify\fP
Behave as if each pattern line has the \fBjitverify\fP modifier; after
successful compilation, each pattern is passed to the just-in-time compiler, if
available, and the use of JIT is verified.
.TP 10
\fB-pattern\fB \fImodifier-list\fP
Behave as if each pattern line contains the given modifiers.
.TP 10
@ -1777,6 +1782,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 04 April 2017
Last updated: 08 April 2017
Copyright (c) 1997-2017 University of Cambridge.
.fi

View File

@ -7253,6 +7253,7 @@ printf(" -error <n,m,..> show messages for error numbers, then exit\n");
printf(" -help show usage information\n");
printf(" -i set default pattern modifier 'info'\n");
printf(" -jit set default pattern modifier 'jit'\n");
printf(" -jitverify set default pattern modifier 'jitverify'\n");
printf(" -q quiet: do not output PCRE2 version number at start\n");
printf(" -pattern <s> set default pattern modifier fields\n");
printf(" -subject <s> set default subject modifier fields\n");
@ -7588,12 +7589,13 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
else if (strcmp(arg, "-d") == 0) def_patctl.control |= CTL_DEBUG;
else if (strcmp(arg, "-dfa") == 0) def_datctl.control |= CTL_DFA;
else if (strcmp(arg, "-i") == 0) def_patctl.control |= CTL_INFO;
else if (strcmp(arg, "-jit") == 0)
else if (strcmp(arg, "-jit") == 0 || strcmp(arg, "-jitverify") == 0)
{
if (arg[4] != 0) def_patctl.control |= CTL_JITVERIFY;
def_patctl.jit = 7; /* full & partial */
#ifndef SUPPORT_JIT
fprintf(stderr, "** Warning: JIT support is not available: "
"-jit calls functions that do nothing.\n");
"-jit[verify] calls functions that do nothing.\n");
#endif
}