On Sat, Apr 26, 2014 at 10:50 AM, Jonathan Wakely jwak...@redhat.com wrote:
This patch is OK, thanks very much.
Committed. Thanks!
--
Regards,
Tim Shen
On 25/04/14 20:50 -0400, Tim Shen wrote:
* include/bits/regex.tcc (__regex_algo_impl): Remove
_GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT and use
_GLIBCXX_REGEX_USE_THOMPSON_NFA instead.
* include/bits/regex_automaton.h: Remove quantifier counting variable.
*
We used _GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT to control which
algorithm we should use; so when compiling a regex, the number of
quantifiers(*, +, ?) will be counted and will be used for the
algorithm switching.
However, I do think give user the manual switch may make things
simpler:
--- a/libstdc++-v3/include/bits/regex.tcc
+++ b/libstdc++-v3/include/bits/regex.tcc
@@ -28,12 +28,12 @@
* Do not attempt to use it directly. @headername{regex}
*/
-// See below __regex_algo_impl to get what this is talking about. The default
-// value 1 indicated a conservative optimization
On Fri, Apr 25, 2014 at 5:14 PM, Jonathan Wakely jwak...@redhat.com wrote:
I wonder if this would be simpler to read like this:
if (!__re._M_automaton-_M_has_backref
#ifndef _GLIBCXX_REGEX_USE_THOMPSON_NFA
__policy == _RegexExecutorPolicy::_S_alternate
#endif
)
On 25/04/14 18:14 -0400, Tim Shen wrote:
On Fri, Apr 25, 2014 at 5:14 PM, Jonathan Wakely jwak...@redhat.com wrote:
I wonder if this would be simpler to read like this:
if (!__re._M_automaton-_M_has_backref
#ifndef _GLIBCXX_REGEX_USE_THOMPSON_NFA
__policy ==
On Fri, Apr 25, 2014 at 7:56 PM, Jonathan Wakely jwak...@redhat.com wrote:
That's why I thought #ifndef would work, not #ifdef
Oh I didn't notice that. Now they are equivalent.
--
Regards,
Tim Shen
commit cb39603d6df4763e95a697792e7b45179994f096
Author: tim timshe...@gmail.com
Date: Fri Apr