Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e922a2cecface14a2aeb027a807fd0d4267911ad
https://github.com/WebKit/WebKit/commit/e922a2cecface14a2aeb027a807fd0d4267911ad
Author: Yusuke Suzuki <[email protected]>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
A JSTests/microbenchmarks/regexp-prototype-match-anchor.js
A JSTests/microbenchmarks/regexp-prototype-match-basic.js
A JSTests/microbenchmarks/regexp-prototype-match-complex-pattern.js
A JSTests/microbenchmarks/regexp-prototype-match-no-strength-reduction.js
A JSTests/microbenchmarks/regexp-prototype-match-observable-side-effects.js
A JSTests/microbenchmarks/regexp-prototype-match-short-string.js
A JSTests/stress/regexp-prototype-symbol-match-edge-cases.js
A JSTests/stress/regexp-prototype-symbol-match-watchpoint-invalidation.js
M Source/JavaScriptCore/builtins/BuiltinNames.h
M Source/JavaScriptCore/builtins/RegExpPrototype.js
M Source/JavaScriptCore/bytecode/LinkTimeConstant.h
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
M Source/JavaScriptCore/runtime/Intrinsic.h
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/RegExpPrototype.cpp
M Source/JavaScriptCore/runtime/RegExpPrototype.h
Log Message:
-----------
[JSC] Move RegExp.prototype[Symbol.match] to C++
https://bugs.webkit.org/show_bug.cgi?id=316509
rdar://178966554
Reviewed by Yijia Huang.
This patch moves RegExp.prototype[Symbol.match] from builtin JS to C++.
It removes bunch of unnecessary helpers and cleaning up code.
ToT
Patched
regexp-prototype-match-complex-pattern 5.9638+-0.0266 ^
5.5963+-0.0286 ^ definitely 1.0657x faster
regexp-prototype-match-observable-side-effects
0.2262+-0.0064 ^
0.2082+-0.0064 ^ definitely 1.0863x faster
regexp-prototype-match-anchor 37.2759+-0.1875 ^
32.7643+-0.2258 ^ definitely 1.1377x faster
regexp-prototype-match-basic 15.2253+-0.0513 ^
14.7911+-0.0504 ^ definitely 1.0294x faster
regexp-prototype-match-short-string 19.6811+-0.2419 ^
15.7282+-0.0934 ^ definitely 1.2513x faster
regexp-prototype-match-no-strength-reduction
20.1454+-0.1046 ^
19.7893+-0.1065 ^ definitely 1.0180x faster
Tests: JSTests/stress/regexp-prototype-symbol-match-edge-cases.js
JSTests/stress/regexp-prototype-symbol-match-watchpoint-invalidation.js
* JSTests/microbenchmarks/regexp-prototype-match-anchor.js: Added.
(shouldBe):
* JSTests/microbenchmarks/regexp-prototype-match-basic.js: Added.
(shouldBe):
* JSTests/microbenchmarks/regexp-prototype-match-complex-pattern.js: Added.
(shouldBe):
* JSTests/microbenchmarks/regexp-prototype-match-no-strength-reduction.js:
Added.
(shouldBe):
* JSTests/microbenchmarks/regexp-prototype-match-observable-side-effects.js:
Added.
(assert):
(prototype.get lastIndex):
(prototype.set lastIndex):
(prototype.exec):
(RegExpC):
(prototype.get flags):
(get obj):
(set obj):
* JSTests/microbenchmarks/regexp-prototype-match-short-string.js: Added.
(shouldBe):
* JSTests/stress/regexp-prototype-symbol-match-edge-cases.js: Added.
(shouldBe):
(shouldThrow):
(re.exec):
(fakeRegExp.get flags):
(fakeRegExp.get lastIndex):
(fakeRegExp.set lastIndex):
* JSTests/stress/regexp-prototype-symbol-match-watchpoint-invalidation.js:
Added.
(shouldBe):
(shouldThrow):
(match):
(custom.exec):
(RegExp.prototype.exec):
(re.lastIndex.valueOf):
(MyRegExp):
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/builtins/RegExpPrototype.js:
(linkTimeConstant.hasObservableSideEffectsForRegExpMatch): Deleted.
(linkTimeConstant.matchSlow): Deleted.
(overriddenName.string_appeared_here.match): Deleted.
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::addRegExpSearchPrimordialChecks):
(JSC::DFG::FixupPhase::addRegExpMatchPrimordialChecks):
* Source/JavaScriptCore/runtime/Intrinsic.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::finishCreation):
(JSC::advanceStringIndex):
(JSC::regExpMatchSlow):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/RegExpPrototype.h:
Canonical link: https://commits.webkit.org/314902@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications