Bug 226934

Summary: Add a form of inline caching where we inline cache based on the key rather than the call site
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 226936    
Bug Blocks:    
Attachments:
Description Flags
WIP none

Description Saam Barati 2021-06-11 12:05:04 PDT
For example, if you had some megamorphic over keys get by val, you could instead have inline caches hanging off each key. For each key, the code might be monomorphic or polymorphic in terms of what structures are seen.

This is helpful for things like a get by val or put by val when iterating a list of keys of an object. For example, a for-in loop, or iterating over Object.keys, etc.
Comment 1 Saam Barati 2021-06-17 11:38:20 PDT
Created attachment 431694 [details]
WIP

Not gonna do this now, but just dropping in a wip
Comment 2 Radar WebKit Bug Importer 2021-06-18 12:05:45 PDT
<rdar://problem/79510415>