JIT style fixes.

This commit is contained in:
Zoltán Herczeg 2016-02-24 10:17:10 +00:00
parent c28ed7fd4a
commit 80d7d825e1
2 changed files with 7 additions and 12 deletions

View File

@ -3603,7 +3603,8 @@ while (TRUE)
case OP_CLASS:
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
if (common->utf && !is_char7_bitset((const sljit_ub *)(cc + 1), FALSE)) return consumed;
if (common->utf && !is_char7_bitset((const sljit_ub *)(cc + 1), FALSE))
return consumed;
#endif
class = TRUE;
break;
@ -4548,7 +4549,6 @@ return TRUE;
}
#undef MAX_N_CHARS
#undef MAX_N_BYTES
static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, PCRE2_UCHAR first_char, BOOL caseless)
{
@ -11194,10 +11194,8 @@ if ((re->overall_options & PCRE2_ANCHORED) == 0 && common->match_end_ptr != 0)
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
}
if (common->fast_forward_bc_ptr != NULL)
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), PRIVATE_DATA(common->fast_forward_bc_ptr + 1));
else
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP),
(common->fast_forward_bc_ptr != NULL) ? (PRIVATE_DATA(common->fast_forward_bc_ptr + 1)) : common->start_ptr);
if ((re->overall_options & PCRE2_ANCHORED) == 0)
{
@ -11218,9 +11216,7 @@ if ((re->overall_options & PCRE2_ANCHORED) == 0)
}
}
else
{
CMPTO(SLJIT_LESS, STR_PTR, 0, (common->match_end_ptr == 0) ? STR_END : TMP1, 0, mainloop_label);
}
}
/* No more remaining characters. */

View File

@ -140,7 +140,6 @@ int main(void)
#define F_DIFF 0x080000
#define F_FORCECONV 0x100000
#define F_PROPERTY 0x200000
#define F_STUDY 0x400000
struct regression_test_case {
int compile_options;
@ -779,11 +778,11 @@ static struct regression_test_case regression_test_cases[] = {
{ MU, A, 0, 0, "(?(DEFINE)(a(*:aa)))a(?1)b|aac", "aac" },
{ MU, A, 0, 0, "(a(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
{ MU, A, 0, 0, "(a(*:aa)){0}(?:b(?1)b)+", "babba" },
{ MU, A, 0, 0 | F_NOMATCH | F_STUDY, "(a(*:aa)){0}(?:b(?1)b)+", "ba" },
{ MU, A, 0, 0 | F_NOMATCH, "(a(*:aa)){0}(?:b(?1)b)+", "ba" },
{ MU, A, 0, 0, "(a\\K(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
{ MU, A, 0, 0, "(a\\K(*:aa)){0}(?:b(?1)b)+", "babba" },
{ MU, A, 0, 0 | F_NOMATCH | F_STUDY, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" },
{ MU, A, 0, 0 | F_NOMATCH | F_STUDY, "(*:mark)m", "a" },
{ MU, A, 0, 0 | F_NOMATCH, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" },
{ MU, A, 0, 0 | F_NOMATCH, "(*:mark)m", "a" },
/* (*COMMIT) verb. */
{ MU, A, 0, 0 | F_NOMATCH, "a(*COMMIT)b", "ac" },