From 14ce0b0c24bfb4dff4bcb602057014a487a19eef Mon Sep 17 00:00:00 2001 From: zherczeg Date: Wed, 1 Apr 2015 13:43:02 +0000 Subject: 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 --- pcre_jit_compile.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'pcre_jit_compile.c') 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); -- cgit v1.2.1