Commit ba266661 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Port Latin-1 changes to the interpreted regexp.

R=dcarney@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12674024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 27b09793
......@@ -73,9 +73,15 @@ static bool BackRefMatchesNoCase(Canonicalize* interp_canonicalize,
unsigned int old_char = subject[from++];
unsigned int new_char = subject[current++];
if (old_char == new_char) continue;
if (old_char - 'A' <= 'Z' - 'A') old_char |= 0x20;
if (new_char - 'A' <= 'Z' - 'A') new_char |= 0x20;
// Convert both characters to lower case.
old_char |= 0x20;
new_char |= 0x20;
if (old_char != new_char) return false;
// Not letters in the ASCII range and Latin-1 range.
if (!(old_char - 'a' <= 'z' - 'a') &&
!(old_char - 224 <= 254 - 224 && old_char != 247)) {
return false;
}
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment