The expression /^.-clef/u.test("\u{1D11E}-clef") should be true, but evaluates to false. The issue is only present when the RegExp JIT is enabled (the default). The YARR interpreter evaluates the expression properly.
This bug was raised in this GitHub issue thread - https://github.com/kangax/compat-table/issues/1322#issuecomment-401969005 This RE also fails, but should pass: /c.lef/u.test( "cπlef" )
<rdar://problem/42026714>
The bug is that the alternative optimizer moved the '.' character class term to after the fixed character terms. The safety check for moving the term did not take into account that the character class is inverted, specifically "not a newline" and therefore the character class' m_hasNonBMPCharacters has an inverted sense. The fix is to check that the character class doesn't have non-BMP character AND it isn't an inverted check of that character class.
Created attachment 344706 [details] Patch
Comment on attachment 344706 [details] Patch r=me "Does not not have BMP characters and is not notted". OK.
r=me too.
Comment on attachment 344706 [details] Patch Clearing flags on attachment: 344706 Committed r233690: <https://trac.webkit.org/changeset/233690>
All reviewed patches have been landed. Closing bug.