Συντάκτης: ph10 Ημερομηνία: Προς: Mitchell Blank Υ/ο: pcre-dev Αντικείμενο: Re: [pcre-dev] pcre2_match() flag to disable JIT
On Tue, 31 May 2016, Mitchell Blank wrote:
> I was looking for a way to disable the JIT on a per-match basis. (For
> example, in the case that PCRE2_ERROR_JIT_STACKLIMIT would be
> triggered) It seems there isn't a way to do this?
>
> Looking at the code it seems that this would be an extremely easy
> feature to add -- it seems that all that would be required is to add
> the flag to PUBLIC_MATCH_OPTIONS but not PUBLIC_JIT_MATCH_OPTIONS.
>
> Would it be more complicated than I think? Is there some other reason
> that there isn't a match flag for this?
There is no reason other than nobody has previously asked for this. And
you are right that it should be very simple to add, although a bit more
than what you suggest. It should perhaps be checked by pcre2_jit_match()
[though that is documented to ignore options it doesn't understand], and
of course pcre2test must be upgraded to test it. And it has to be
documented. Sometimes the work on the infrastructure is much more than
the actual code change. :-)
There is likely to be a new release of PCRE2 in July. I should be able
to sneak this in for that.