Bug 238115

Summary: Reduce size of CodeBlock and UnlinkedCodeBlock.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: ASSIGNED ---    
Severity: Normal CC: annulen, benjamin, cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, keith_miller, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. ews-feeder: commit-queue-

Description Mark Lam 2022-03-19 12:50:42 PDT
Introduce a PackedFixedVector and PackedUniquePtr and use them in CodeBlock and UnlinkedCodeBlock.

This reduces the size of the CodeBlock from 248 to 240 i.e. drops from 16 atoms (rounded up from 15.5) to 15 atoms.
This reduces the size of the UnlinkedCodeBlock from 216 to 192 i.e. drops from 14 atoms (rounded up from 13.5) to 12 atoms.
Comment 1 Mark Lam 2022-03-19 12:57:54 PDT
Created attachment 455170 [details]
proposed patch.

Let's get some EWS testing.
Comment 2 Mark Lam 2022-03-23 17:57:36 PDT
The current proposal using Packed pointers appear to have a perf regression.  Going to try using a ButterflyFixedVector instead (on Yusuke's suggestion).
Comment 3 Radar WebKit Bug Importer 2022-03-26 12:51:15 PDT
<rdar://problem/90880721>