Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c5b8a0234ef8ab9bae325275d92dc06917a5823b https://github.com/WebKit/WebKit/commit/c5b8a0234ef8ab9bae325275d92dc06917a5823b Author: Sosuke Suzuki <sosuke.suz...@dr-ubie.com> Date: 2024-04-16 (Tue, 16 Apr 2024)
Changed paths: M JSTests/ChakraCore.yaml R JSTests/ChakraCore/test/UnifiedRegex/split.baseline-jsc A JSTests/stress/string-prototype-split-regexp-legacy-properties.js M Source/JavaScriptCore/runtime/RegExpPrototype.cpp Log Message: ----------- [JSC] Use RegExpGlobalData::performMatch instead of RegExp::match for RegExp.prototype.@@split https://bugs.webkit.org/show_bug.cgi?id=244839 Reviewed by Darin Adler. RegExp.prototype.@@split should update the following legacy RegExp static properties[1][2][3]: - RegExp.input - RegExp.lastMatch - RegExp.lastParen - RegExp.leftContext - RegExp.rightContext - RegExp.$1, ... RegExp.$9 This patch changes RegExp.prototype.@@split to use RegExpGlobalData::performMatch instead of RegExp::match. This change ensures that the legacy RegExp static properties are updated. [1]: https://github.com/tc39/proposal-regexp-legacy-features/blob/e4257f8e83c4d4b648ef1b6150c01ba5938def37/README.md#updatelegacyregexpstaticproperties--c-s-startindex-endindex-capturedvalues- [2]: https://github.com/tc39/proposal-regexp-legacy-features/blob/e4257f8e83c4d4b648ef1b6150c01ba5938def37/README.md#regexpbuiltinexec--r-s- [3]: https://tc39.es/ecma262/#sec-regexp.prototype-@@split * JSTests/ChakraCore.yaml: * JSTests/ChakraCore/test/UnifiedRegex/split.baseline-jsc: Removed. * JSTests/stress/string-prototype-split-regexp-legacy-properties.js: Added. (shouldBe): * Source/JavaScriptCore/runtime/RegExpPrototype.cpp: (JSC::genericSplit): (JSC::JSC_DEFINE_HOST_FUNCTION): Canonical link: https://commits.webkit.org/277559@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes