| 230 |
"bad offset value", |
"bad offset value", |
| 231 |
NULL, /* SHORTUTF8 is handled specially */ |
NULL, /* SHORTUTF8 is handled specially */ |
| 232 |
"nested recursion at the same subject position", |
"nested recursion at the same subject position", |
| 233 |
"JIT stack limit reached" |
"JIT stack limit reached" |
| 234 |
}; |
}; |
| 235 |
|
|
| 236 |
|
|
| 1289 |
|
|
| 1290 |
if (strcmp(argv[op], "-m") == 0) showstore = 1; |
if (strcmp(argv[op], "-m") == 0) showstore = 1; |
| 1291 |
else if (strcmp(argv[op], "-s") == 0) force_study = 0; |
else if (strcmp(argv[op], "-s") == 0) force_study = 0; |
| 1292 |
else if (strcmp(argv[op], "-s+") == 0) |
else if (strcmp(argv[op], "-s+") == 0) |
| 1293 |
{ |
{ |
| 1294 |
force_study = 1; |
force_study = 1; |
| 1295 |
force_study_options = PCRE_STUDY_JIT_COMPILE; |
force_study_options = PCRE_STUDY_JIT_COMPILE; |
| 1296 |
} |
} |
| 1297 |
else if (strcmp(argv[op], "-q") == 0) quiet = 1; |
else if (strcmp(argv[op], "-q") == 0) quiet = 1; |
| 1298 |
else if (strcmp(argv[op], "-b") == 0) debug = 1; |
else if (strcmp(argv[op], "-b") == 0) debug = 1; |
| 1299 |
else if (strcmp(argv[op], "-i") == 0) showinfo = 1; |
else if (strcmp(argv[op], "-i") == 0) showinfo = 1; |
| 1665 |
#endif |
#endif |
| 1666 |
|
|
| 1667 |
case 'S': |
case 'S': |
| 1668 |
if (do_study == 0) |
if (do_study == 0) |
| 1669 |
{ |
{ |
| 1670 |
do_study = 1; |
do_study = 1; |
| 1671 |
if (*pp == '+') |
if (*pp == '+') |
| 1672 |
{ |
{ |
| 1673 |
study_options |= PCRE_STUDY_JIT_COMPILE; |
study_options |= PCRE_STUDY_JIT_COMPILE; |
| 1674 |
pp++; |
pp++; |
| 1675 |
} |
} |
| 1676 |
} |
} |
| 1677 |
else |
else |
| 1678 |
{ |
{ |
| 1679 |
do_study = 0; |
do_study = 0; |
| 2156 |
fprintf(outfile, "\n"); |
fprintf(outfile, "\n"); |
| 2157 |
} |
} |
| 2158 |
} |
} |
| 2159 |
|
|
| 2160 |
/* Show this only if the JIT was set by /S, not by -s. */ |
/* Show this only if the JIT was set by /S, not by -s. */ |
| 2161 |
|
|
| 2162 |
if ((study_options & PCRE_STUDY_JIT_COMPILE) != 0) |
if ((study_options & PCRE_STUDY_JIT_COMPILE) != 0) |
| 2163 |
{ |
{ |
| 2164 |
int jit; |
int jit; |
| 2165 |
new_info(re, extra, PCRE_INFO_JIT, &jit); |
new_info(re, extra, PCRE_INFO_JIT, &jit); |
| 2166 |
if (jit) |
if (jit) |
| 2167 |
fprintf(outfile, "JIT study was successful\n"); |
fprintf(outfile, "JIT study was successful\n"); |
| 2168 |
else |
else |
| 2169 |
#ifdef SUPPORT_JIT |
#ifdef SUPPORT_JIT |
| 2170 |
fprintf(outfile, "JIT study was not successful\n"); |
fprintf(outfile, "JIT study was not successful\n"); |
| 2171 |
#else |
#else |
| 2172 |
fprintf(outfile, "JIT support is not available in this version of PCRE\n"); |
fprintf(outfile, "JIT support is not available in this version of PCRE\n"); |
| 2173 |
#endif |
#endif |
| 2174 |
} |
} |
| 2175 |
} |
} |
| 2176 |
} |
} |
| 2177 |
|
|
| 2492 |
getnamesptr = npp; |
getnamesptr = npp; |
| 2493 |
} |
} |
| 2494 |
continue; |
continue; |
| 2495 |
|
|
| 2496 |
case 'J': |
case 'J': |
| 2497 |
while(isdigit(*p)) n = n * 10 + *p++ - '0'; |
while(isdigit(*p)) n = n * 10 + *p++ - '0'; |
| 2498 |
if (extra != NULL |
if (extra != NULL |
| 2499 |
&& (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 |
&& (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 |
| 2500 |
&& extra->executable_jit != NULL) |
&& extra->executable_jit != NULL) |
| 2501 |
{ |
{ |
| 2502 |
if (jit_stack != NULL) pcre_jit_stack_free(jit_stack); |
if (jit_stack != NULL) pcre_jit_stack_free(jit_stack); |
| 2503 |
jit_stack = pcre_jit_stack_alloc(1, n * 1024); |
jit_stack = pcre_jit_stack_alloc(1, n * 1024); |
| 2504 |
pcre_assign_jit_stack(extra, jit_callback, jit_stack); |
pcre_assign_jit_stack(extra, jit_callback, jit_stack); |
| 2505 |
} |
} |
| 2506 |
continue; |
continue; |
| 2507 |
|
|
| 2508 |
case 'L': |
case 'L': |
| 2728 |
extra->flags = 0; |
extra->flags = 0; |
| 2729 |
} |
} |
| 2730 |
else extra->flags &= ~PCRE_EXTRA_EXECUTABLE_JIT; |
else extra->flags &= ~PCRE_EXTRA_EXECUTABLE_JIT; |
| 2731 |
|
|
| 2732 |
(void)check_match_limit(re, extra, bptr, len, start_offset, |
(void)check_match_limit(re, extra, bptr, len, start_offset, |
| 2733 |
options|g_notempty, use_offsets, use_size_offsets, |
options|g_notempty, use_offsets, use_size_offsets, |
| 2734 |
PCRE_EXTRA_MATCH_LIMIT, &(extra->match_limit), |
PCRE_EXTRA_MATCH_LIMIT, &(extra->match_limit), |
| 3083 |
setlocale(LC_CTYPE, "C"); |
setlocale(LC_CTYPE, "C"); |
| 3084 |
locale_set = 0; |
locale_set = 0; |
| 3085 |
} |
} |
| 3086 |
if (jit_stack != NULL) |
if (jit_stack != NULL) |
| 3087 |
{ |
{ |
| 3088 |
pcre_jit_stack_free(jit_stack); |
pcre_jit_stack_free(jit_stack); |
| 3089 |
jit_stack = NULL; |
jit_stack = NULL; |
| 3090 |
} |
} |
| 3091 |
} |
} |
| 3092 |
|
|
| 3093 |
if (infile == stdin) fprintf(outfile, "\n"); |
if (infile == stdin) fprintf(outfile, "\n"); |