| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 | 45 |
| 46 static bool BackRefMatchesNoCase(int from, | 46 static bool BackRefMatchesNoCase(int from, |
| 47 int current, | 47 int current, |
| 48 int len, | 48 int len, |
| 49 Vector<const uc16> subject) { | 49 Vector<const uc16> subject) { |
| 50 for (int i = 0; i < len; i++) { | 50 for (int i = 0; i < len; i++) { |
| 51 unibrow::uchar old_char = subject[from++]; | 51 unibrow::uchar old_char = subject[from++]; |
| 52 unibrow::uchar new_char = subject[current++]; | 52 unibrow::uchar new_char = subject[current++]; |
| 53 if (old_char == new_char) continue; | 53 if (old_char == new_char) continue; |
| 54 interp_canonicalize.get(old_char, '\0', &old_char); | 54 unibrow::uchar old_string[1] = { old_char }; |
| 55 interp_canonicalize.get(new_char, '\0', &new_char); | 55 unibrow::uchar new_string[1] = { new_char }; |
| 56 if (old_char != new_char) { | 56 interp_canonicalize.get(old_char, '\0', old_string); |
| 57 interp_canonicalize.get(new_char, '\0', new_string); |
| 58 if (old_string[0] != new_string[0]) { |
| 57 return false; | 59 return false; |
| 58 } | 60 } |
| 59 } | 61 } |
| 60 return true; | 62 return true; |
| 61 } | 63 } |
| 62 | 64 |
| 63 | 65 |
| 64 static bool BackRefMatchesNoCase(int from, | 66 static bool BackRefMatchesNoCase(int from, |
| 65 int current, | 67 int current, |
| 66 int len, | 68 int len, |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 if (start_position != 0) previous_char = subject_vector[start_position - 1]; | 636 if (start_position != 0) previous_char = subject_vector[start_position - 1]; |
| 635 return RawMatch(code_base, | 637 return RawMatch(code_base, |
| 636 subject_vector, | 638 subject_vector, |
| 637 registers, | 639 registers, |
| 638 start_position, | 640 start_position, |
| 639 previous_char); | 641 previous_char); |
| 640 } | 642 } |
| 641 } | 643 } |
| 642 | 644 |
| 643 } } // namespace v8::internal | 645 } } // namespace v8::internal |
| OLD | NEW |