<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202490] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202490">202490</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2016-06-27 10:38:55 -0700 (Mon, 27 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B
https://bugs.webkit.org/show_bug.cgi?id=158505

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This change makes it so that the CharacterClassEscape \w matches the inverse of
\W and vice versa for unicode, ignore case RegExp's.

Before this change, both /\w/ui and /\W/ui RegExp's would match the characters
k, K, s, S, \u017f (Latin Small Letter Long S) and \u212a (Kelvin Sign).
This was due to how the ES6 standard defined matching of character classes
specifically that the abstract operation &quot;Canonicalize()&quot; is called for the
character to be matched AND for the characters in the character class we are
matching against.  This change is to make \W always be the inverse of \w.
It is still the case that the characters that match against \w changes
depending on a regular expression's flags.

The only real changes occur for regular expressions with both the unicode and
ignore case flags set.  Updated the character class generator to make 
nonwordUnicodeIgnoreCaseChar not include k, K, s, S, \u017f and \u212a.
Changed BytecodePattern.wordcharCharacterClass to use the correct
word character class for the flags.  Simplfied character class set up in
in the pattern to use m_pattern.wordUnicodeIgnoreCaseCharCharacterClass and
invert as appropriate when unicode and ignore case are both set.

* create_regex_tables:
* yarr/YarrInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):

LayoutTests:

Updated and added test cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsregexpunicodeexpectedtxt">trunk/LayoutTests/js/regexp-unicode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsregexpunicodejs">trunk/LayoutTests/js/script-tests/regexp-unicode.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorecreate_regex_tables">trunk/Source/JavaScriptCore/create_regex_tables</a></li>
<li><a href="#trunkSourceJavaScriptCoreyarrYarrInterpreterh">trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreyarrYarrPatterncpp">trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/LayoutTests/ChangeLog        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-06-27  Michael Saboff  &lt;msaboff@apple.com&gt;
+
+        ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B
+        https://bugs.webkit.org/show_bug.cgi?id=158505
+
+        Reviewed by Geoffrey Garen.
+
+        Updated and added test cases.
+
+        * js/regexp-unicode-expected.txt:
+        * js/script-tests/regexp-unicode.js:
+
</ins><span class="cx"> 2016-06-27  Frederic Wang  &lt;fwang@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Set an upper limit for the size or number of pieces of stretchy operators
</span></span></pre></div>
<a id="trunkLayoutTestsjsregexpunicodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/regexp-unicode-expected.txt (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regexp-unicode-expected.txt        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/LayoutTests/js/regexp-unicode-expected.txt        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -41,36 +41,33 @@
</span><span class="cx"> PASS &quot;Ťx&quot;.match(/ťx/iu)[0].length is 2
</span><span class="cx"> PASS /\w/iu.test(&quot;ſ&quot;) is true
</span><span class="cx"> PASS /\w/iu.test(&quot;K&quot;) is true
</span><del>-PASS /!\w/iu.test(&quot;ſ&quot;) is false
-PASS /!\w/iu.test(&quot;K&quot;) is false
-PASS /\W/iu.test(&quot;ſ&quot;) is true
-PASS /\W/iu.test(&quot;K&quot;) is true
-PASS /!\W/iu.test(&quot;ſ&quot;) is false
-PASS /!\W/iu.test(&quot;K&quot;) is false
</del><ins>+PASS /\W/iu.test(&quot;ſ&quot;) is false
+PASS /\W/iu.test(&quot;K&quot;) is false
</ins><span class="cx"> PASS /[\w\d]/iu.test(&quot;ſ&quot;) is true
</span><span class="cx"> PASS /[\w\d]/iu.test(&quot;K&quot;) is true
</span><span class="cx"> PASS /[^\w\d]/iu.test(&quot;ſ&quot;) is false
</span><span class="cx"> PASS /[^\w\d]/iu.test(&quot;K&quot;) is false
</span><del>-PASS /[\W\d]/iu.test(&quot;ſ&quot;) is true
-PASS /[\W\d]/iu.test(&quot;K&quot;) is true
-PASS /[^\W\d]/iu.test(&quot;ſ&quot;) is false
-PASS /[^\W\d]/iu.test(&quot;K&quot;) is false
</del><ins>+PASS /[\W\d]/iu.test(&quot;ſ&quot;) is false
+PASS /[\W\d]/iu.test(&quot;K&quot;) is false
+PASS /[^\W\d]/iu.test(&quot;ſ&quot;) is true
+PASS /[^\W\d]/iu.test(&quot;K&quot;) is true
</ins><span class="cx"> PASS /\w/iu.test(&quot;S&quot;) is true
</span><span class="cx"> PASS /\w/iu.test(&quot;K&quot;) is true
</span><del>-PASS /!\w/iu.test(&quot;S&quot;) is false
-PASS /!\w/iu.test(&quot;K&quot;) is false
-PASS /\W/iu.test(&quot;S&quot;) is true
-PASS /\W/iu.test(&quot;K&quot;) is true
-PASS /!\W/iu.test(&quot;S&quot;) is false
-PASS /!\W/iu.test(&quot;K&quot;) is false
</del><ins>+PASS /\W/iu.test(&quot;S&quot;) is false
+PASS /\W/iu.test(&quot;K&quot;) is false
</ins><span class="cx"> PASS /[\w\d]/iu.test(&quot;S&quot;) is true
</span><span class="cx"> PASS /[\w\d]/iu.test(&quot;K&quot;) is true
</span><span class="cx"> PASS /[^\w\d]/iu.test(&quot;S&quot;) is false
</span><span class="cx"> PASS /[^\w\d]/iu.test(&quot;K&quot;) is false
</span><del>-PASS /[\W\d]/iu.test(&quot;S&quot;) is true
-PASS /[\W\d]/iu.test(&quot;K&quot;) is true
-PASS /[^\W\d]/iu.test(&quot;S&quot;) is false
-PASS /[^\W\d]/iu.test(&quot;K&quot;) is false
</del><ins>+PASS /[\W\d]/iu.test(&quot;S&quot;) is false
+PASS /[\W\d]/iu.test(&quot;K&quot;) is false
+PASS /[^\W\d]/iu.test(&quot;S&quot;) is true
+PASS /[^\W\d]/iu.test(&quot;K&quot;) is true
+PASS &quot;Grasſoden is old German for grass&quot;.match(/.*?\Bs\u017foden/iu)[0] is &quot;Grasſoden&quot;
+PASS &quot;Grasſoden is old German for grass&quot;.match(/.*?\B\u017foden/iu)[0] is &quot;Grasſoden&quot;
+PASS &quot;Grasſoden is old German for grass&quot;.match(/.*?\Boden/iu)[0] is &quot;Grasſoden&quot;
+PASS &quot;Grasſoden is old German for grass&quot;.match(/.*?\Bden/iu)[0] is &quot;Grasſoden&quot;
+PASS &quot;Water freezes at 273K which is 0C.&quot;.split(/\b\s/iu) is [&quot;Water&quot;,&quot;freezes&quot;,&quot;at&quot;,&quot;273K&quot;,&quot;which&quot;,&quot;is&quot;,&quot;0C.&quot;]
</ins><span class="cx"> PASS &quot;𝌆&quot;.match(/^.$/u)[0].length is 2
</span><span class="cx"> PASS &quot;It is 78°&quot;.match(/.*/u)[0].length is 9
</span><span class="cx"> PASS stringWithDanglingFirstSurrogate.match(/.*/u)[0].length is 3
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsregexpunicodejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/regexp-unicode.js (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/regexp-unicode.js        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/LayoutTests/js/script-tests/regexp-unicode.js        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -45,38 +45,34 @@
</span><span class="cx"> shouldBe('&quot;\u0164x&quot;.match(/\u0165x/iu)[0].length', '2');
</span><span class="cx"> shouldBeTrue('/\\w/iu.test(&quot;\u017f&quot;)');
</span><span class="cx"> shouldBeTrue('/\\w/iu.test(&quot;\u212a&quot;)');
</span><del>-shouldBeFalse('/!\\w/iu.test(&quot;\u017f&quot;)');
-shouldBeFalse('/!\\w/iu.test(&quot;\u212a&quot;)');
-shouldBeTrue('/\\W/iu.test(&quot;\u017f&quot;)');
-shouldBeTrue('/\\W/iu.test(&quot;\u212a&quot;)');
-shouldBeFalse('/!\\W/iu.test(&quot;\u017f&quot;)');
-shouldBeFalse('/!\\W/iu.test(&quot;\u212a&quot;)');
</del><ins>+shouldBeFalse('/\\W/iu.test(&quot;\u017f&quot;)');
+shouldBeFalse('/\\W/iu.test(&quot;\u212a&quot;)');
</ins><span class="cx"> shouldBeTrue('/[\\w\\d]/iu.test(&quot;\u017f&quot;)');
</span><span class="cx"> shouldBeTrue('/[\\w\\d]/iu.test(&quot;\u212a&quot;)');
</span><span class="cx"> shouldBeFalse('/[^\\w\\d]/iu.test(&quot;\u017f&quot;)');
</span><span class="cx"> shouldBeFalse('/[^\\w\\d]/iu.test(&quot;\u212a&quot;)');
</span><del>-shouldBeTrue('/[\\W\\d]/iu.test(&quot;\u017f&quot;)');
-shouldBeTrue('/[\\W\\d]/iu.test(&quot;\u212a&quot;)');
-shouldBeFalse('/[^\\W\\d]/iu.test(&quot;\u017f&quot;)');
-shouldBeFalse('/[^\\W\\d]/iu.test(&quot;\u212a&quot;)');
</del><ins>+shouldBeFalse('/[\\W\\d]/iu.test(&quot;\u017f&quot;)');
+shouldBeFalse('/[\\W\\d]/iu.test(&quot;\u212a&quot;)');
+shouldBeTrue('/[^\\W\\d]/iu.test(&quot;\u017f&quot;)');
+shouldBeTrue('/[^\\W\\d]/iu.test(&quot;\u212a&quot;)');
</ins><span class="cx"> shouldBeTrue('/\\w/iu.test(&quot;S&quot;)');
</span><span class="cx"> shouldBeTrue('/\\w/iu.test(&quot;K&quot;)');
</span><del>-shouldBeFalse('/!\\w/iu.test(&quot;S&quot;)');
-shouldBeFalse('/!\\w/iu.test(&quot;K&quot;)');
-shouldBeTrue('/\\W/iu.test(&quot;S&quot;)');
-shouldBeTrue('/\\W/iu.test(&quot;K&quot;)');
-shouldBeFalse('/!\\W/iu.test(&quot;S&quot;)');
-shouldBeFalse('/!\\W/iu.test(&quot;K&quot;)');
</del><ins>+shouldBeFalse('/\\W/iu.test(&quot;S&quot;)');
+shouldBeFalse('/\\W/iu.test(&quot;K&quot;)');
</ins><span class="cx"> shouldBeTrue('/[\\w\\d]/iu.test(&quot;S&quot;)');
</span><span class="cx"> shouldBeTrue('/[\\w\\d]/iu.test(&quot;K&quot;)');
</span><span class="cx"> shouldBeFalse('/[^\\w\\d]/iu.test(&quot;S&quot;)');
</span><span class="cx"> shouldBeFalse('/[^\\w\\d]/iu.test(&quot;K&quot;)');
</span><del>-shouldBeTrue('/[\\W\\d]/iu.test(&quot;S&quot;)');
-shouldBeTrue('/[\\W\\d]/iu.test(&quot;K&quot;)');
-shouldBeFalse('/[^\\W\\d]/iu.test(&quot;S&quot;)');
-shouldBeFalse('/[^\\W\\d]/iu.test(&quot;K&quot;)');
</del><ins>+shouldBeFalse('/[\\W\\d]/iu.test(&quot;S&quot;)');
+shouldBeFalse('/[\\W\\d]/iu.test(&quot;K&quot;)');
+shouldBeTrue('/[^\\W\\d]/iu.test(&quot;S&quot;)');
+shouldBeTrue('/[^\\W\\d]/iu.test(&quot;K&quot;)');
+shouldBe('&quot;Gras\u017foden is old German for grass&quot;.match(/.*?\\Bs\\u017foden/iu)[0]', '&quot;Gras\u017foden&quot;');
+shouldBe('&quot;Gras\u017foden is old German for grass&quot;.match(/.*?\\B\\u017foden/iu)[0]', '&quot;Gras\u017foden&quot;');
+shouldBe('&quot;Gras\u017foden is old German for grass&quot;.match(/.*?\\Boden/iu)[0]', '&quot;Gras\u017foden&quot;');
+shouldBe('&quot;Gras\u017foden is old German for grass&quot;.match(/.*?\\Bden/iu)[0]', '&quot;Gras\u017foden&quot;');
+shouldBe('&quot;Water freezes at 273\u212a which is 0C.&quot;.split(/\\b\\s/iu)', '[&quot;Water&quot;,&quot;freezes&quot;,&quot;at&quot;,&quot;273\u212a&quot;,&quot;which&quot;,&quot;is&quot;,&quot;0C.&quot;]');
</ins><span class="cx"> 
</span><del>-
</del><span class="cx"> // Test . matches with Unicode flag
</span><span class="cx"> shouldBe('&quot;\u{1D306}&quot;.match(/^.$/u)[0].length', '2');
</span><span class="cx"> shouldBe('&quot;It is 78\u00B0&quot;.match(/.*/u)[0].length', '9');
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-06-27  Michael Saboff  &lt;msaboff@apple.com&gt;
+
+        ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B
+        https://bugs.webkit.org/show_bug.cgi?id=158505
+
+        Reviewed by Geoffrey Garen.
+
+        This change makes it so that the CharacterClassEscape \w matches the inverse of
+        \W and vice versa for unicode, ignore case RegExp's.
+
+        Before this change, both /\w/ui and /\W/ui RegExp's would match the characters
+        k, K, s, S, \u017f (Latin Small Letter Long S) and \u212a (Kelvin Sign).
+        This was due to how the ES6 standard defined matching of character classes
+        specifically that the abstract operation &quot;Canonicalize()&quot; is called for the
+        character to be matched AND for the characters in the character class we are
+        matching against.  This change is to make \W always be the inverse of \w.
+        It is still the case that the characters that match against \w changes
+        depending on a regular expression's flags.
+
+        The only real changes occur for regular expressions with both the unicode and
+        ignore case flags set.  Updated the character class generator to make 
+        nonwordUnicodeIgnoreCaseChar not include k, K, s, S, \u017f and \u212a.
+        Changed BytecodePattern.wordcharCharacterClass to use the correct
+        word character class for the flags.  Simplfied character class set up in
+        in the pattern to use m_pattern.wordUnicodeIgnoreCaseCharCharacterClass and
+        invert as appropriate when unicode and ignore case are both set.
+
+        * create_regex_tables:
+        * yarr/YarrInterpreter.h:
+        (JSC::Yarr::BytecodePattern::BytecodePattern):
+        * yarr/YarrPattern.cpp:
+        (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
+
</ins><span class="cx"> 2016-06-25  Keith Miller  &lt;keith_miller@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DFGByteCodeParsing does not handle calling the Object constructor with no arguments correctly
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorecreate_regex_tables"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/create_regex_tables (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/create_regex_tables        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/Source/JavaScriptCore/create_regex_tables        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">     &quot;wordchar&quot;: { &quot;UseTable&quot; : True, &quot;data&quot;: ['_', ('0','9'), ('A', 'Z'), ('a','z')]},
</span><span class="cx">     &quot;wordUnicodeIgnoreCaseChar&quot;: { &quot;UseTable&quot; : False, &quot;data&quot;: ['_', ('0', '9'), ('A', 'Z'), ('a', 'z'), 0x017f, 0x212a]},
</span><span class="cx">     &quot;nonwordchar&quot;: { &quot;UseTable&quot; : True, &quot;Inverse&quot;: &quot;wordchar&quot;, &quot;data&quot;: ['`', (0, ord('0') - 1), (ord('9') + 1, ord('A') - 1), (ord('Z') + 1, ord('_') - 1), (ord('z') + 1, 0x10ffff)]},
</span><del>-    &quot;nonwordUnicodeIgnoreCaseChar&quot;: { &quot;UseTable&quot; : False, &quot;Inverse&quot;: &quot;wordchar&quot;, &quot;data&quot;: ['k', 'K', 's', 'S', '`', (0, ord('0') - 1), (ord('9') + 1, ord('A') - 1), (ord('Z') + 1, ord('_') - 1), (ord('z') + 1, 0x10ffff)]},
</del><ins>+    &quot;nonwordUnicodeIgnoreCaseChar&quot;: { &quot;UseTable&quot; : False, &quot;Inverse&quot;: &quot;wordUnicodeIgnoreCaseChar&quot;, &quot;data&quot;: ['`', (0, ord('0') - 1), (ord('9') + 1, ord('A') - 1), (ord('Z') + 1, ord('_') - 1), (ord('z') + 1, 0x017e), (0x0180, 0x2129), (0x212b, 0x10ffff)]},
</ins><span class="cx">     &quot;newline&quot;: { &quot;UseTable&quot; : False, &quot;data&quot;: ['\n', '\r', 0x2028, 0x2029]},
</span><span class="cx">     &quot;spaces&quot;: { &quot;UseTable&quot; : True, &quot;data&quot;: [' ', ('\t', '\r'), 0xa0, 0x1680, 0x180e, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000, (0x2000, 0x200a), 0xfeff]},
</span><span class="cx">     &quot;nonspaces&quot;: { &quot;UseTable&quot; : True, &quot;Inverse&quot;: &quot;spaces&quot;, &quot;data&quot;: [(0, ord('\t') - 1), (ord('\r') + 1, ord(' ') - 1), (ord(' ') + 1, 0x009f), (0x00a1, 0x167f), (0x1681, 0x180d), (0x180f, 0x1fff), (0x200b, 0x2027), (0x202a, 0x202e), (0x2030, 0x205e), (0x2060, 0x2fff), (0x3001, 0xfefe), (0xff00, 0x10ffff)]},
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreyarrYarrInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -347,7 +347,10 @@
</span><span class="cx">         m_body-&gt;terms.shrinkToFit();
</span><span class="cx"> 
</span><span class="cx">         newlineCharacterClass = pattern.newlineCharacterClass();
</span><del>-        wordcharCharacterClass = pattern.wordcharCharacterClass();
</del><ins>+        if (unicode() &amp;&amp; ignoreCase())
+            wordcharCharacterClass = pattern.wordUnicodeIgnoreCaseCharCharacterClass();
+        else
+            wordcharCharacterClass = pattern.wordcharCharacterClass();
</ins><span class="cx"> 
</span><span class="cx">         m_allParenthesesInfo.swap(parenthesesInfoToAdopt);
</span><span class="cx">         m_allParenthesesInfo.shrinkToFit();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreyarrYarrPatterncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp (202489 => 202490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp        2016-06-27 17:36:09 UTC (rev 202489)
+++ trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp        2016-06-27 17:38:55 UTC (rev 202490)
</span><span class="lines">@@ -351,12 +351,9 @@
</span><span class="cx">             m_alternative-&gt;m_terms.append(PatternTerm(m_pattern.spacesCharacterClass(), invert));
</span><span class="cx">             break;
</span><span class="cx">         case WordClassID:
</span><del>-            if (m_pattern.unicode() &amp;&amp; m_pattern.ignoreCase()) {
-                if (invert)
-                    m_alternative-&gt;m_terms.append(PatternTerm(m_pattern.nonwordUnicodeIgnoreCaseCharCharacterClass(), false));
-                else
-                    m_alternative-&gt;m_terms.append(PatternTerm(m_pattern.wordUnicodeIgnoreCaseCharCharacterClass(), false));
-            } else
</del><ins>+            if (m_pattern.unicode() &amp;&amp; m_pattern.ignoreCase())
+                m_alternative-&gt;m_terms.append(PatternTerm(m_pattern.wordUnicodeIgnoreCaseCharCharacterClass(), invert));
+            else
</ins><span class="cx">                 m_alternative-&gt;m_terms.append(PatternTerm(m_pattern.wordcharCharacterClass(), invert));
</span><span class="cx">             break;
</span><span class="cx">         case NewlineClassID:
</span></span></pre>
</div>
</div>

</body>
</html>