summaryrefslogtreecommitdiffstats
path: root/js/src/irregexp/imported/gen-regexp-special-case.cc
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/irregexp/imported/gen-regexp-special-case.cc')
-rw-r--r--js/src/irregexp/imported/gen-regexp-special-case.cc48
1 files changed, 0 insertions, 48 deletions
diff --git a/js/src/irregexp/imported/gen-regexp-special-case.cc b/js/src/irregexp/imported/gen-regexp-special-case.cc
index 8f6557ed30..0875568250 100644
--- a/js/src/irregexp/imported/gen-regexp-special-case.cc
+++ b/js/src/irregexp/imported/gen-regexp-special-case.cc
@@ -8,7 +8,6 @@
#include <sstream>
#include "irregexp/imported/special-case.h"
-#include "unicode/usetiter.h"
namespace v8 {
namespace internal {
@@ -126,52 +125,6 @@ void PrintSpecial(std::ofstream& out) {
PrintSet(out, "SpecialAddSet", special_add);
}
-void PrintUnicodeSpecial(std::ofstream& out) {
- icu::UnicodeSet non_simple_folding;
- icu::UnicodeSet current;
- UErrorCode status = U_ZERO_ERROR;
- // Look at all characters except white spaces.
- icu::UnicodeSet interestingCP(u"[^[:White_Space:]]", status);
- CHECK_EQ(status, U_ZERO_ERROR);
- icu::UnicodeSetIterator iter(interestingCP);
- while (iter.next()) {
- UChar32 c = iter.getCodepoint();
- current.set(c, c);
- current.closeOver(USET_CASE_INSENSITIVE).removeAllStrings();
- CHECK(!current.isBogus());
- // Remove characters from the closeover that have a simple case folding.
- icu::UnicodeSet toRemove;
- icu::UnicodeSetIterator closeOverIter(current);
- while (closeOverIter.next()) {
- UChar32 closeOverChar = closeOverIter.getCodepoint();
- UChar32 closeOverSCF = u_foldCase(closeOverChar, U_FOLD_CASE_DEFAULT);
- if (closeOverChar != closeOverSCF) {
- toRemove.add(closeOverChar);
- }
- }
- CHECK(!toRemove.isBogus());
- current.removeAll(toRemove);
-
- // The current character and its simple case folding are also always OK.
- UChar32 scf = u_foldCase(c, U_FOLD_CASE_DEFAULT);
- current.remove(c);
- current.remove(scf);
-
- // If there are any characters remaining, they were added due to full case
- // foldings and shouldn't match the current charcter according to the spec.
- if (!current.isEmpty()) {
- // Ensure that the character doesn't have a simple case folding.
- // Otherwise the current approach of simply removing the character from
- // the set before calling closeOver won't work.
- CHECK_EQ(c, scf);
- non_simple_folding.add(c);
- }
- }
- CHECK(!non_simple_folding.isBogus());
-
- PrintSet(out, "UnicodeNonSimpleCloseOverSet", non_simple_folding);
-}
-
void WriteHeader(const char* header_filename) {
std::ofstream out(header_filename);
out << std::hex << std::setfill('0') << std::setw(4);
@@ -192,7 +145,6 @@ void WriteHeader(const char* header_filename) {
<< "namespace internal {\n\n";
PrintSpecial(out);
- PrintUnicodeSpecial(out);
out << "\n"
<< "} // namespace internal\n"