[Patch] Internal functions for testsuite in regex
Paolo Carlini
paolo.carlini@oracle.com
Fri Oct 4 16:04:00 GMT 2013
Hi,
On 10/04/2013 04:13 PM, Tim Shen wrote:
> This is based on disscusions
> here(http://gcc.gnu.org/ml/libstdc++/2013-10/msg00034.html)
>
> And it successfully find a bug in regex_executor.tcc :)
>
> Booted and tested under -m32, -m64 and debug before the change in
> regex_executor.tcc;
> -m32 and -m64 only for regex_executor.tcc, but I'll start a bootstrap now.
Can you please add short comments inline in the code explaining the
semantics of the new functions? A short comment before each one. In
particular, the new *_testsuite functions, isn't immediately clear in
what they differ from the non-_testsuite variants. In any case we should
figure out a better name, maybe even *_internal, if we can't find
anything more accurate, but it should be self-explaining in terms of
their C++ semantics.
Please also document in a comment before the definition of
__regex_search_impl the __policy parameter (not just in the body of the
function). And I don't see why we can't use an enumeration instead of
integers, like
enum class _RegexExecutorPolicy : int { _AutoExecutor, _DFSExecutor,
_BFSExecutor };
More trivial issues: inline functions (like all the new _testsuite ones)
should be in .h, not in .tcc. Some unuglified names, like res ans res2.
Paolo.
More information about the Libstdc++
mailing list