Bug 152738

Summary: Changing prototypes should cache the new structure.
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: JavaScriptCoreAssignee: Keith Miller <keith_miller>
Status: NEW ---    
Severity: Normal CC: sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.