Bug 226934 - Add a form of inline caching where we inline cache based on the key rather than the call site
Summary: Add a form of inline caching where we inline cache based on the key rather th...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on: 226936
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-11 12:05 PDT by Saam Barati
Modified: 2021-06-18 12:05 PDT (History)
1 user (show)

See Also:


Attachments
WIP (32.49 KB, patch)
2021-06-17 11:38 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>