summaryrefslogtreecommitdiff
path: root/pcre_jit_compile.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-04-01 13:43:02 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2015-04-01 13:43:02 +0000
commit14ce0b0c24bfb4dff4bcb602057014a487a19eef (patch)
tree5959b1edcda4e72bae9c0bdd43a0fc494313047d /pcre_jit_compile.c
parent6ad109ad6c477ea3f0816dac273d0e5ef8253993 (diff)
downloadpcre-14ce0b0c24bfb4dff4bcb602057014a487a19eef.tar.gz
Minor refactor in JIT and set auto-possessify limit to 1000 from 10000 (to match the Changelog).
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1541 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_jit_compile.c')
-rw-r--r--pcre_jit_compile.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 538cee5..dd378e0 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -7255,12 +7255,14 @@ if (opcode == OP_COND || opcode == OP_SCOND)
add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), JUMP(SLJIT_ZERO));
matchingpath += 1 + 2 * IMM2_SIZE;
}
- else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF)
+ else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF || *matchingpath == OP_FAIL)
{
/* Never has other case. */
BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL;
SLJIT_ASSERT(!has_alternatives);
+ if (*matchingpath == OP_FAIL)
+ stacksize = 0;
if (*matchingpath == OP_RREF)
{
stacksize = GET2(matchingpath, 1);
@@ -7310,17 +7312,6 @@ if (opcode == OP_COND || opcode == OP_SCOND)
matchingpath = cc;
}
}
- else if (*matchingpath == OP_FAIL)
- {
- SLJIT_ASSERT(!has_alternatives);
- if (*cc == OP_ALT)
- {
- matchingpath = cc + 1 + LINK_SIZE;
- cc += GET(cc, 1);
- }
- else
- matchingpath = cc;
- }
else
{
SLJIT_ASSERT(has_alternatives && *matchingpath >= OP_ASSERT && *matchingpath <= OP_ASSERTBACK_NOT);