This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] Add comments for future regex work
- From: Tim Shen <timshen91 at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 2 Dec 2013 16:15:43 -0500
- Subject: [Patch] Add comments for future regex work
- Authentication-results: sourceware.org; auth=none
...for optimization purpose. Should be done in one month.
Thanks!
--
Regards,
Tim Shen
commit cc7d58128e68455498d0257c4796cb70a9e24990
Author: tim <timshen91@gmail.com>
Date: Mon Dec 2 15:49:15 2013 -0500
2013-12-02 Tim Shen <timshen91@gmail.com>
* regex_compiler.h: Add todo comment.
* regex_executor.tcc: Likewise.
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index b9f8127..5759d48 100644
--- a/libstdc++-v3/include/bits/regex_compiler.h
+++ b/libstdc++-v3/include/bits/regex_compiler.h
@@ -237,6 +237,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/// Matches a character range (bracket expression)
+ // TODO: Convert used _M_flags fields to template parameters, including
+ // collate and icase. Avoid using std::set, could use flat_set
+ // (sorted vector and binary search) instead; use an fixed sized (256)
+ // vector<bool> for char specialization if necessary.
template<typename _TraitsT>
struct _BracketMatcher
{
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index 22fd67c..150adb4 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -162,6 +162,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return false;
}
+ // TODO: Use a function vector to dispatch, instead of using switch-case.
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
template<bool __match_mode>