Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 159f9e46d6bb256c1de1ed39f66935ccaf987734 https://github.com/WebKit/WebKit/commit/159f9e46d6bb256c1de1ed39f66935ccaf987734 Author: Yusuke Suzuki <ysuz...@apple.com> Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths: M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp M Source/JavaScriptCore/bytecode/InlineCacheCompiler.h M Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp M Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h M Source/JavaScriptCore/bytecode/Watchpoint.h M Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp M Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h Log Message: ----------- [JSC] JIT stub should hold Watchpoint and WatchpointSet https://bugs.webkit.org/show_bug.cgi?id=273454 rdar://127262594 Reviewed by Keith Miller. Previously, our approach is 1. Collecting WatchpointSet throughout IC 2. Watch them and holding watchpoints in StructureStubInfo (or its owining data structures) 3. When WatchpointSet fires, clearing StructureStubInfo. Instead, the new approach is 1. Collecting WatchpointSet throughout IC 2. Watch them and holding watchpoints in IC JIT Stub 3. IC JIT Stub also holds WatchpointSet 4. StructureStubInfo watches (3)'s WatchpointSet instead. 5. When WatchpointSet fires, invalidating (3)'s IC JIT Stub's WatchpointSet. 6. Because of (5), WatchpointSet fires, and clearing StructureStubInfo. In this way, we can have one WatchpointSet managed by IC JIT Stub. And each *potentially multiple* StructureStubInfo can monitor this condition by inserting Watchpoint into this set. In this way, we can share one IC JIT Stub with multiple StructureStubInfo even if the IC has watchpoints. This is the work towards Handler IC. * Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp: (JSC::InlineCacheHandler::InlineCacheHandler): (JSC::m_watchpoint): (JSC::InlineCacheCompiler::generateImpl): (JSC::InlineCacheCompiler::regenerate): (JSC::m_watchpoints): Deleted. * Source/JavaScriptCore/bytecode/InlineCacheCompiler.h: * Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp: (JSC::StructureStubInfoClearingWatchpoint::fireInternal): (JSC::StructureTransitionStructureStubClearingWatchpoint::fireInternal): (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndInstallWatchpoint): (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): (JSC::AdaptiveValueStructureStubClearingWatchpoint::handleFire): (JSC::WatchpointsOnStructureStubInfo::isValid const): Deleted. * Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h: * Source/JavaScriptCore/bytecode/Watchpoint.h: * Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp: (JSC::PolymorphicAccessJITStubRoutine::PolymorphicAccessJITStubRoutine): (JSC::PolymorphicAccessJITStubRoutine::setWatchpoints): (JSC::PolymorphicAccessJITStubRoutine::invalidate): * Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h: (JSC::PolymorphicAccessJITStubRoutine::watchpoints const): (JSC::PolymorphicAccessJITStubRoutine::watchpointSet): Canonical link: https://commits.webkit.org/278148@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