RESOLVED FIXED271949
AX: Introduce reference versions of AXObjectCache::get and AXObjectCache::getOrCreate
https://bugs.webkit.org/show_bug.cgi?id=271949
Summary AX: Introduce reference versions of AXObjectCache::get and AXObjectCache::get...
Tyler Wilcock
Reported 2024-03-31 12:43:38 PDT
At most callsites of AXObjectCache::get and AXObjectCache::getOrCreate, we already know the Node* / RenderObject* / Widget* is not null, but we still perform an extra null check in these methods anyways, which is a waste. And looking at the assembly generated by clang, it's not smart enough to optimize the null checks away itself in any of these contexts.
Attachments
Patch (71.25 KB, patch)
2024-03-31 13:05 PDT, Tyler Wilcock
no flags
Patch (71.30 KB, patch)
2024-04-01 17:47 PDT, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2024-03-31 12:43:46 PDT
Tyler Wilcock
Comment 2 2024-03-31 13:05:41 PDT
chris fleizach
Comment 3 2024-04-01 16:58:27 PDT
Comment on attachment 470689 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=470689&action=review > Source/WebCore/accessibility/AXObjectCache.h:301 > + AccessibilityObject* get(Node* node) const does it make sense to make these inline?
Tyler Wilcock
Comment 4 2024-04-01 17:47:10 PDT
Tyler Wilcock
Comment 5 2024-04-01 17:47:27 PDT
(In reply to chris fleizach from comment #3) > Comment on attachment 470689 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=470689&action=review > > > Source/WebCore/accessibility/AXObjectCache.h:301 > > + AccessibilityObject* get(Node* node) const > > does it make sense to make these inline? Yeah I think so, done in latest patch!
EWS
Comment 6 2024-04-02 00:05:58 PDT
Committed 276927@main (c608d5842016): <https://commits.webkit.org/276927@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 470712 [details].
Note You need to log in before you can comment on or make changes to this bug.