Changeset 198866 in webkit
- Timestamp:
- Mar 30, 2016 5:38:20 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198859 r198866 1 2016-03-30 Michael Saboff <msaboff@apple.com> 2 3 [ES6] Quantified unicode regular expressions do not work for counts greater than 1 4 https://bugs.webkit.org/show_bug.cgi?id=156044 5 6 Reviewed by Mark Lam. 7 8 Added new test cases. 9 10 * js/regexp-unicode-expected.txt: 11 * js/script-tests/regexp-unicode.js: 12 1 13 2016-03-30 Myles C. Maxfield <mmaxfield@apple.com> 2 14 -
trunk/LayoutTests/js/regexp-unicode-expected.txt
r198624 r198866 58 58 PASS re2.test("") is false 59 59 PASS re2.test("𒍅") is true 60 PASS /𝌆{2}/u.test("𝌆𝌆") is true 61 PASS /𝌆{2}/u.test("𝌆𝌆") is true 62 PASS "𐐁𐐁𐐀".match(/𐐁{1,3}/u)[0] is "𐐁𐐁" 63 PASS "𐐁𐐩".match(/𐐁{1,3}/iu)[0] is "𐐁𐐩" 64 PASS "𐐁𐐩𐐪𐐩".match(/𐐁{1,}/iu)[0] is "𐐁𐐩" 60 65 PASS "𐌑𐌑𐌑".match(/𐌑*a|𐌑*./u)[0] is "𐌑𐌑𐌑" 61 66 PASS "a𐌑𐌑".match(/a𐌑*?$/u)[0] is "a𐌑𐌑" -
trunk/LayoutTests/js/script-tests/regexp-unicode.js
r198624 r198866 93 93 // shouldBe('"\uD803\u{10c01}".match(/\uD803\u{10c01}/u)[0].length', '3'); 94 94 95 // Check quantified matches 96 shouldBeTrue('/\u{1d306}{2}/u.test("\u{1d306}\u{1d306}")'); 97 shouldBeTrue('/\uD834\uDF06{2}/u.test("\uD834\uDF06\uD834\uDF06")'); 98 shouldBe('"\u{10401}\u{10401}\u{10400}".match(/\u{10401}{1,3}/u)[0]', '"\u{10401}\u{10401}"'); 99 shouldBe('"\u{10401}\u{10429}".match(/\u{10401}{1,3}/iu)[0]', '"\u{10401}\u{10429}"'); 100 shouldBe('"\u{10401}\u{10429}\u{1042a}\u{10429}".match(/\u{10401}{1,}/iu)[0]', '"\u{10401}\u{10429}"'); 101 95 102 // Check back tracking on partial matches 96 103 shouldBe('"\u{10311}\u{10311}\u{10311}".match(/\u{10311}*a|\u{10311}*./u)[0]', '"\u{10311}\u{10311}\u{10311}"'); -
trunk/Source/JavaScriptCore/ChangeLog
r198855 r198866 1 2016-03-30 Michael Saboff <msaboff@apple.com> 2 3 [ES6] Quantified unicode regular expressions do not work for counts greater than 1 4 https://bugs.webkit.org/show_bug.cgi?id=156044 5 6 Reviewed by Mark Lam. 7 8 Fixed incorrect indexing of non-BMP characters in fixed patterns. The old code 9 was indexing by character units, a single JS character, instead of code points 10 which is 2 JS characters. 11 12 * yarr/YarrInterpreter.cpp: 13 (JSC::Yarr::Interpreter::matchDisjunction): 14 1 15 2016-03-30 Mark Lam <mark.lam@apple.com> 2 16 -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r198624 r198866 1225 1225 if (!U_IS_BMP(currentTerm().atom.patternCharacter)) { 1226 1226 for (unsigned matchAmount = 0; matchAmount < currentTerm().atom.quantityCount; ++matchAmount) { 1227 if (!checkSurrogatePair(currentTerm().atom.patternCharacter, currentTerm().inputPosition - matchAmount)) {1227 if (!checkSurrogatePair(currentTerm().atom.patternCharacter, currentTerm().inputPosition - 2 * matchAmount)) { 1228 1228 BACKTRACK(); 1229 1229 }
Note: See TracChangeset
for help on using the changeset viewer.