Re: [pcre-dev] option setting for JIT?

Startseite
Nachricht löschen
Autor: ph10
Datum:  
To: Nils Goroll
CC: pcre-dev
Betreff: Re: [pcre-dev] option setting for JIT?
On Sun, 11 Jan 2015, Nils Goroll wrote:

> On 10/01/15 08:27, Zoltán Herczeg wrote:
> > Perhaps you could do this in application level, making this as a mandatory first option, and simply check the first few characters of any regex. If a regex starts with (*JIT)/(*NOJIT) simply skip these characters.
>
> Yes, this sounds like a good option. In this case I'd prefer if we could just
> document the flag for this purpose.


I did have another idea. (*NOJIT) could just set a flag in the compiled
code. The application could always call pcre2_jit_compile(), with the
option(s) it needs (partial or not-partial), but if the flag is set,
pcre2_jit_compile() would do nothing. This avoids the "static linked
size" problem, and does not involve any extra code at matching time.
If the application does not call pcre2_jit_compile(), that's also fine.

What do you think? This allows the creator of the pattern to force
not-JIT, but does not allow the opposite.

Philip

--
Philip Hazel