This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Internal functions for testsuite in regex
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Tim Shen <timshen91 at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 04 Oct 2013 18:04:02 +0200
- Subject: Re: [Patch] Internal functions for testsuite in regex
- Authentication-results: sourceware.org; auth=none
- References: <CAPrifDmLY-=nJa8dNcsduTgWN2fT1PJ7bu9JEDqYdQCcyqC2JA at mail dot gmail dot com>
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.