Bug 152738 - Changing prototypes should cache the new structure.
Summary: Changing prototypes should cache the new structure.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-05 11:04 PST by Keith Miller
Modified: 2016-01-20 12:07 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2016-01-05 11:04:35 PST
Currently, when a programmer changes the prototype of their object we allocate a new structure every time even if they use the same prototype every time. Not only does this use linear additional memory if they do it to every object they allocate but it also perniciously causes all the code these objects touch to become megamorphic.
Comment 1 Keith Miller 2016-01-20 12:07:54 PST
Whoever looks at this should consider fixing caching the structure for bound functions when the prototype is null.