Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0c18eb164fcaf88405612ec4194fb9cb4b5a12fa
https://github.com/WebKit/WebKit/commit/0c18eb164fcaf88405612ec4194fb9cb4b5a12fa
Author: Yusuke Suzuki <[email protected]>
Date: 2026-06-15 (Mon, 15 Jun 2026)
Changed paths:
A JSTests/microbenchmarks/regexp-prototype-symbol-split.js
A JSTests/stress/regexp-symbol-split-constructor-species-override.js
A JSTests/stress/regexp-symbol-split-cpp-migration.js
A JSTests/stress/regexp-symbol-split-source-match-observability.js
A JSTests/stress/regexp-symbol-split-species-override.js
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/DerivedSources-input.xcfilelist
M Source/JavaScriptCore/DerivedSources.make
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/builtins/BuiltinNames.h
M Source/JavaScriptCore/builtins/GlobalOperations.js
R Source/JavaScriptCore/builtins/RegExpPrototype.js
M Source/JavaScriptCore/bytecode/LinkTimeConstant.h
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGClobberize.h
M Source/JavaScriptCore/dfg/DFGDoesGC.cpp
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
M Source/JavaScriptCore/dfg/DFGGraph.h
M Source/JavaScriptCore/dfg/DFGJITCode.cpp
M Source/JavaScriptCore/dfg/DFGJITCode.h
M Source/JavaScriptCore/dfg/DFGNode.h
M Source/JavaScriptCore/dfg/DFGNodeType.h
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/dfg/DFGOperations.h
M Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
M Source/JavaScriptCore/dfg/DFGSafeToExecute.h
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
M Source/JavaScriptCore/ftl/FTLCapabilities.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.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.split] to C++
https://bugs.webkit.org/show_bug.cgi?id=316934
rdar://179402451
Reviewed by Yijia Huang.
This patch moves RegExp.prototype[Symbol.split] implementation from
builtin JS to C++. And we remove RegExpPrototype.js builtin file from
JSC. Mostly mimicking RegExp.prototype[Symbol.match] migration and also
carefully update comments to align to the latest spec descriptions.
Tests: JSTests/microbenchmarks/regexp-prototype-symbol-split.js
JSTests/stress/regexp-symbol-split-cpp-migration.js
JSTests/stress/regexp-symbol-split-source-match-observability.js
* JSTests/microbenchmarks/regexp-prototype-symbol-split.js: Added.
(symbolSplit):
* JSTests/stress/regexp-symbol-split-constructor-species-override.js: Added.
(shouldBe):
(get return):
* JSTests/stress/regexp-symbol-split-cpp-migration.js: Added.
(shouldBe):
(shouldThrow):
(shouldThrow.splitFn.call):
(shouldBe.WithNullSpecies.get Symbol):
(shouldBe.WithNullSpecies):
(shouldBe.WithUndefinedSpecies.get Symbol):
(shouldBe.WithUndefinedSpecies):
(shouldBe.CustomSpecies.get Symbol):
(shouldBe.CustomSpecies):
(shouldBe.species):
(throw.new.Error.get splitFn):
(get try):
(throw.new.Error):
(shouldBe.BadCtor):
(shouldBe.BadCtor.get Symbol):
(shouldBe.splitFn.call):
(shouldBe.splitFn.call.TraceExec.prototype.exec):
(shouldBe.splitFn.call.TraceExec):
(throw.new.Error.BadExec.prototype.exec):
(throw.new.Error.BadExec):
(shouldThrow.prototype.exec):
(shouldBe.LastIndexHack.prototype.exec):
(shouldBe.LastIndexHack):
(shouldBe.FakeArray.prototype.exec):
(shouldBe.FakeArray):
(shouldBe.SeeFlags.prototype.get flags):
(shouldBe.SeeFlags):
(shouldBe.string_appeared_here.split):
* JSTests/stress/regexp-symbol-split-source-match-observability.js: Added.
(shouldBe):
(shouldBe.splitFn.call.get try):
(shouldBe.splitFn.call):
(Object.defineProperty.get shouldBe):
(get try):
(Object.defineProperty):
(Object.defineProperty.get const):
(get const):
* JSTests/stress/regexp-symbol-split-species-override.js: Added.
(shouldBe):
(rx.Symbol.species):
(doSplit):
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/DerivedSources-input.xcfilelist:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/builtins/GlobalOperations.js:
(linkTimeConstant.advanceStringIndex):
(linkTimeConstant.regExpExec):
* Source/JavaScriptCore/builtins/RegExpPrototype.js: Removed.
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* Source/JavaScriptCore/dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::addRegExpSplitPrimordialChecks):
* Source/JavaScriptCore/dfg/DFGGraph.h:
* Source/JavaScriptCore/dfg/DFGJITCode.cpp:
(JSC::DFG::JITData::JITData):
(JSC::DFG::JITData::tryInitialize):
* Source/JavaScriptCore/dfg/DFGJITCode.h:
* Source/JavaScriptCore/dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
* Source/JavaScriptCore/dfg/DFGNodeType.h:
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/dfg/DFGOperations.h:
* Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:
* Source/JavaScriptCore/dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/runtime/Intrinsic.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::finishCreation):
(JSC::regExpMatchSlow):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::regExpSplitFast):
(JSC::regExpSplitSlow):
(JSC::regExpReplaceGeneric):
* Source/JavaScriptCore/runtime/RegExpPrototype.h:
Canonical link: https://commits.webkit.org/315243@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications