Bug 232172

Summary: Change Heap::writeBarrier() to do the cheaper check first.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. none

Description Mark Lam 2021-10-22 13:53:05 PDT
It's cheaper to do a check using incoming args (which are already loaded in registers) than to do a check which requires memory loads.
Comment 1 Mark Lam 2021-10-22 13:55:18 PDT
Created attachment 442195 [details]
proposed patch.
Comment 2 Robin Morisset 2021-10-22 13:57:16 PDT
Comment on attachment 442195 [details]
proposed patch.

r=me
Comment 3 Mark Lam 2021-10-22 14:00:59 PDT
Comment on attachment 442195 [details]
proposed patch.

Thanks for the review.
Comment 4 EWS 2021-10-22 14:47:41 PDT
Committed r284715 (243430@main): <https://commits.webkit.org/243430@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442195 [details].
Comment 5 Radar WebKit Bug Importer 2021-10-22 14:48:20 PDT
<rdar://problem/84564524>