Changeset 252683 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Nov 19, 2019, 9:12:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r252680 r252683 1 2019-11-19 Ross Kirsling <[email protected]> 2 3 Implement String.prototype.replaceAll 4 https://bugs.webkit.org/show_bug.cgi?id=202471 5 6 Reviewed by Yusuke Suzuki. 7 8 Implement the stage 3 proposal here: 9 https://github.com/tc39/proposal-string-replaceall 10 11 String.prototype.replaceAll is the same as String.prototype.replace, except: 12 1. When the first argument is a string, all instances of the search string are replaced. 13 2. When the first argument is a non-global regular expression, a TypeError is thrown. 14 15 * builtins/BuiltinNames.h: 16 * builtins/StringPrototype.js: 17 (replaceAll): Added. 18 * runtime/StringPrototype.cpp: 19 (JSC::StringPrototype::finishCreation): 20 (JSC::jsSpliceSubstringsWithSeparators): Add early out for single-replacement case. 21 (JSC::replaceUsingStringSearch): Add global replacement logic, following replaceUsingRegExpSearch. 22 (JSC::replace): 23 (JSC::stringProtoFuncReplaceUsingStringSearch): 24 (JSC::stringProtoFuncReplaceAllUsingStringSearch): Added. 25 1 26 2019-11-19 Robin Morisset <[email protected]> 2 27
Note:
See TracChangeset
for help on using the changeset viewer.